Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Minimum Bars Required

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

    Minimum Bars Required

    I run a strategy that uses MA of 50 bars. If I set the minimum bars required to 20 there are no trades, if I set it to 50 or more the trades happen. Why is this so when I have continous data on my chart.

    #2
    kassaindia, how much data are you using for the backtest period? The min bars required is merely a way to stop trades from displaying on the first x bars of the chart, so to give indicators used time to catch up with their calculated values.

    Comment


      #3
      Iam usind data from jan 1 2009 to august 31, 2009.
      Originally posted by NinjaTrader_Bertrand View Post
      kassaindia, how much data are you using for the backtest period? The min bars required is merely a way to stop trades from displaying on the first x bars of the chart, so to give indicators used time to catch up with their calculated values.

      Comment


        #4
        Ok, is this daily or lower granularity data? Do you see the same happening with the SampleMACrossover script?

        Comment


          #5
          It is a 1 min chart. MA cross over is not comparing values of MA over previous bars so it works fine
          Originally posted by NinjaTrader_Bertrand View Post
          Ok, is this daily or lower granularity data? Do you see the same happening with the SampleMACrossover script?

          Comment


            #6
            Sorry don't follow you - please post a screenshot of the exact issue you see happening, thanks.

            Comment


              #7
              Attached is the screen shot. You will see results on the screen shot with min bars required as 25 and no result on the screen shot that says 20 bars.

              Originally posted by NinjaTrader_Bertrand View Post
              Sorry don't follow you - please post a screenshot of the exact issue you see happening, thanks.
              Attached Files

              Comment


                #8
                Thanks kassaindia, not sure why you see this discrepancy - any errors in your log as this happens? Any way I could test this on my end with your strategy?

                Comment


                  #9
                  Iam sending you a sample code on e-mail. It is a part of my main code but it is this part that is showing problem. If you run this you will come to know the error. Attached herewith are the screen shots also for your ref.

                  Originally posted by NinjaTrader_Bertrand View Post
                  Thanks kassaindia, not sure why you see this discrepancy - any errors in your log as this happens? Any way I could test this on my end with your strategy?
                  Attached Files

                  Comment


                    #10
                    Thanks got you note and will take a look shortly.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                    0 responses
                    651 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