Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Minimum bars required effect

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

    Minimum bars required effect

    Hi,
    I have been stuck lately while backtesting on Minimum bars required parameter - its value (20 / 40 / 100 / etc.) changes strategy results drastically.

    Let me give an example - One of the parts I want to use in my strategy is 10 day ATR indicator on 5 minute timeframe. Counting with days as a whole - ((24*60)/5)*10 = 2880 bars needed to count ATR
    My backtest however shows blank graph with these high values.

    Question: Does it really mean I need to set Minimum bars required to aprox. 2880?
    Or is it just days to load set to 10?

    Is my understading of these parameters right?

    Thank you for your reply.

    #2
    Hello fLife,

    The 'Min. bars required' option sets the minimum number of bars required, before the backtest will start processing. So as per your example, the strategy would only start processing after 2880 bars. The default value is 20 for this option, which is similar to our indicators - they require a minimum of 20 bars to be calculated.
    JasonNinjaTrader Customer Service

    Comment


      #3
      Thank you for explanation,
      but still: In order to have 10 days of ATR calculated properly on 5 minute timeframe, i need to set the minimum bars required accordingly, right? (in this case lets say 2880, as for example)

      Comment


        #4
        Yes, if you need 2880 bars to calculate the ATR, please set it accordingly as well as the From and To dates. They need to exceed 2880 bars.
        JasonNinjaTrader Customer Service

        Comment


          #5
          Thank you for verifying that. Which gets me to my second question - once I set the MBR parameter a bit higher to 150 or more (testing last 6 months) i get blank GRAPH and the summary says 0.

          Whenever I set testing period from lets say 2009 to present, I am able to set MBR to 600 approx. Anything higher give me no results.

          But 600 bars in 5 minute timeframe equals 50 hours. Which is very small part of tested period 2009-present.

          I cannot understand the logic behind that. Why am I getting no results? The only parameter I change in this specific situation is really just "minimum bars required".

          Comment


            #6
            Are you able to reproduce it when testing the SampleMACrossOver strategy?
            JasonNinjaTrader Customer Service

            Comment


              #7
              Tested.SampleMACrossOver - it gave me results even with extremely high numbers.

              What do you think is the cause?

              Comment


                #8
                This indicates it is related to the strategy in question. I cannot reproduce it on my end using the SampleMACrossOver either. I suggest to check the code of your strategy and see if you can find clarification why it behaves this way when using high values for 'Min. bars required'.

                Unfortunately, I am not a programmer myself. If you need assistance with the strategy code, please let me know and I will assign your ticket to our NinjaScript queue.
                JasonNinjaTrader Customer Service

                Comment


                  #9
                  Thank you for assistance. I will try to check the code myself first. If i find myself in a dead end, I would appreciate so much, if you could get ticked assigned.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by bortz, 11-06-2023, 08:04 AM
                  47 responses
                  1,605 views
                  0 likes
                  Last Post aligator  
                  Started by jaybedreamin, Today, 05:56 PM
                  0 responses
                  8 views
                  0 likes
                  Last Post jaybedreamin  
                  Started by DJ888, 04-16-2024, 06:09 PM
                  6 responses
                  18 views
                  0 likes
                  Last Post DJ888
                  by DJ888
                   
                  Started by Jon17, Today, 04:33 PM
                  0 responses
                  4 views
                  0 likes
                  Last Post Jon17
                  by Jon17
                   
                  Started by Javierw.ok, Today, 04:12 PM
                  0 responses
                  13 views
                  0 likes
                  Last Post Javierw.ok  
                  Working...
                  X