Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

loading & processing required number of bars for multi-time

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

    loading & processing required number of bars for multi-time

    I want to use information from many previous days (say SMA(20) on close of day) on a small scale chart (say 1 minute).

    Problem1: I need to specify "days to load" > 20 (on primary series) to get 20 day bars to load. For instance if I specify 20 it may only actually load say 12 bars (due to non-trading days). This means the SMA(20) will be inaccurate since it will really be giving figure for say SMA(12).

    Problem 2: Even if I specify a large enough "days to load" (say 32) to get 20 day bars loaded, there is still the problem I don't want to fill up memory with 20 trading days worth of minute bars (even worse if I was using seconds or ticks), I only really want no more than the last day's worth of this. So is there some way of forcing the load/processing of an added long-duration period series, without loading the full equivalent calendar length of bars in the base short-duration series?

    Possible solution:
    NT adds another parameter (say "BarsToLoad") to the Add method. So instead of currently using
    Code:
    Add(PeriodType.Day,1);
    to add an unknown number of day bars, I could use
    Code:
    Add(PeriodType.Day,1,20);
    (where the last parameter is suggested "BarsToLoad").

    When this new method was used NT would call OnBarUpdate for each of the requested number of BarsToLoad on the long-duration series (even if there was only a day or less of short-duration primary bars loaded).

    #2
    Hi DaveE,

    Thank you for your input regarding enhancing NinjaTrader; we will track your feedback using ID# 1280.
    Ryan M.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by RaddiFX, Today, 10:15 AM
    2 responses
    13 views
    0 likes
    Last Post RaddiFX
    by RaddiFX
     
    Started by patrickmlee007, Today, 09:33 AM
    2 responses
    17 views
    0 likes
    Last Post patrickmlee007  
    Started by magnatauren, 08-15-2020, 02:12 PM
    5 responses
    206 views
    0 likes
    Last Post RaddiFX
    by RaddiFX
     
    Started by rene69851, 05-02-2024, 03:25 PM
    1 response
    22 views
    0 likes
    Last Post rene69851  
    Started by ETFVoyageur, Yesterday, 07:05 PM
    5 responses
    45 views
    0 likes
    Last Post ETFVoyageur  
    Working...
    X