fxDreema

    • Register
    • Login
    • Search
    • Back to the main page
    • Categories
    • Recent
    • Tags
    • Popular
    • Search

    Moving Average Crossover also trades when price crosses

    Bug Reports
    2
    5
    748
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • J
      jimsterling last edited by

      Please see my MAcrossover by jimsterling. It is making the trades correctly when the moving averages cross but it also initiates trades when the price crosses the longer moving average which complete changes the results.

      Hope you can fix this soon.

      Thanks,

      Jim

      1 Reply Last reply Reply Quote 0
      • fxDreema
        fxDreema last edited by

        It looks like this for me: http://prntscr.com/5o6ltw I think that it's fine. One of the slow MAs is exponential, that's why there are two long MAs over there, but this is your project. Otherwise it looks correct for me.

        If you are talking for those moments that does not look as a crossover AFTER the backtest ends, then this is because the current candle is used for the crossover and as you know, the current candle is unfinished. So there were some crossovers that "disappeared" before the current candle's end.

        1 Reply Last reply Reply Quote 0
        • J
          jimsterling last edited by

          My mistake. Thanks for looking at this.

          I have a new problem I hope you will look at. Ever since I added Variables as the moving averages it no longer generates any trades.

          Many thanks,

          Jim

          1 Reply Last reply Reply Quote 0
          • fxDreema
            fxDreema last edited by

            Condition -> Value -> Numeric -> right-click over the input field and choose the variable from the list

            Those variables you are using are also called global variables, but they are different kind of global variables 🙂

            1 Reply Last reply Reply Quote 0
            • J
              jimsterling last edited by

              I see. I'm still not getting any trades. Do I need to eliminate the Global variables?

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • First post
                Last post

              Online Users

              S
              T
              F
              S
              D

              14
              Online

              146.9k
              Users

              22.4k
              Topics

              122.6k
              Posts

              Powered by NodeBB Forums | Contributors