Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Menu item "days to load" ; "min. bars required"

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

    Menu item "days to load" ; "min. bars required"

    Hello,
    I have a question for the full assurance that I understand the matter.
    When setting the strategy set "days to load" what exactly? It is the number of days that are downloaded into a "stack" of graphs which are then interpreted and strategy?

    A menu item "Min. bar required "is exactly what? It is the number of bars that will be recorded from the beginning of the period skipped? What is this function good? This value is the number of days? Or do I need for 5min chart value (* 24hour 60min) / 5min?

    -If I am using multiinstrument strategy on 5 min chart with day instrument where I get ATR data what values should I enter into both items? Are they affecting second instrument as well?
    For days to load, say, 60 and for min bars required 20?

    Are these two items dependent on each other?




    Thank you very much

    #2
    Hello fLife,

    Thanks for your post.

    The days to load will determine how many days of historical data will be downloaded on your computer starting with the End date moving backwards. If Days to load is set to 5, and the interval type is minute, then 5 days of historical data will be downloaded to your computer.
    This is used for both charts and for back-testing over data.

    Min bars required is the number of bars that have to pass before the strategy will start evaluating.
    Lets say that you check a close price 10 bars ago in the code of your script. If you call Close[10] on the first historical bar and BarsRequired is set to 0, this will cause an error and break your script. If you call Close[10] then BarsRequired needs to be set to 11. (This ensures there is enough data to prevent an error from breaking the script)

    With multiple data series the BarsRequired should apply to all added data series, but its always best practice to hard code into your script a check that all CurrentBar indexes are greater than BarsRequired.
    For example:
    if (CurrentBars[0] < BarsRequired || CurrentBars[1] < BarsRequired)
    return;
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    580 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    335 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    102 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    554 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    552 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X