Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SMA Backtesting

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    SMA Backtesting

    Hello,

    I want to use a simple moving average crossover. (5,20). And it doesn't seem to enter on the crossover correctly...

    Thanks in advance


    Hobs

    mycustomstrategy.doc

    #2
    Hello PilotHobs,

    What is the incorrect behavior you are experiencing?

    Is the order not entering at all?

    Is the order appearing on the next bar after the cross?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by PilotHobs View Post
      Hello,

      I want to use a simple moving average crossover. (5,20). And it doesn't seem to enter on the crossover correctly...

      Thanks in advance


      Hobs

      [ATTACH]31415[/ATTACH]
      Just to say very briefly that you have 'CrossAbove' for both long and short. One of these should be 'CrossBelow'.

      Comment


        #4



        This is an example of not entering the trade at the crossover.

        Thanks


        Hobs
        Attached Files
        Last edited by PilotHobs; 02-20-2015, 05:07 PM.

        Comment


          #5
          I think that was the problem. I fixed it and am getting a much better graph.



          Thanks



          Hobs

          Comment


            #6
            Originally posted by PilotHobs View Post
            I think that was the problem. I fixed it and am getting a much better graph.

            Thanks

            Hobs
            Hobs - nice to hear it's now working out.

            I'm guessing that the error occurred because you copied the first condition for the second condition, intending to change everything as necessary but forgot to do this.

            I've done this and continue to do this so often. I wasted a whole day recently because I copied a line of C# 'algebra' and didn't alter the letters accordingly.

            It's a shame the Ninja scripts can't be formatted so areas that need changing can be highlighted.

            If only...

            Cheers,

            Ed

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            650 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            370 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            109 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            574 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            577 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X