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

MaximumBarsLookBack options

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

    MaximumBarsLookBack options

    I would like to understand,

    what is the logic, that only 2 possible values for MaximumBarsLookBack exist:
    • Infinite
    • TwoHundredFiftySix


    Why there is no possibility to set some custom value? or at least some more options to be meet different requirements on some scale? Why is this so black/white? Is it complicated to do more options for different needs?

    Please help for my case:
    256 values back is really too low number, but Infinite values is complete memory killer (required 1500MB of memory in small 4-years backtest).
    If I had access to last 3000 bars, it would be sufficient for all cases.
    How current framework supports this situation?

    Thanx
    Last edited by misova; 03-08-2015, 12:24 PM.

    #2
    Hello misova,

    Thank you for your post.

    The bars are still loaded based on the BarsToLoad or DaysToLoad, but the calculations on the current bar can either go back 256 or Infinite. The indicators or strategies will still calculate on the full range of bars loaded but the current bar calculates as far as the MaximumBarsLookBack.

    If the current bar needs to access 3000 bars back then Infinite would be used as you know, but you are correct that this is far more taxing on the resources allocated to the platform. Does your current bar need to access back over 3000 bars? As in using a 3000 period for a moving average (example)?

    Comment


      #3
      There is a need to go programmatically around 3000 bars back,
      because lour ogic searches the history for some situation/pattern until if finds it.
      The searched values are often not plotted (I understand, there is always Infinite access on Plots),
      but exposed programmatically via custom property with DataSeries.
      And here is the problem - 256 limit is unacceptable low value, the Infinite too big - consumes extreme resources.

      Do you think, that customizable value for MaximumBarsLookBack would be good enhancement for NT8 or is there any reason, why this is limited to only these 2 values?

      It looks too me like black/white solution various needs...
      Why not let the developer choose the own value for MaximumBarsLookBack ?
      i.e. developer sets own value how many elements should be accessible and maintained in memory on each dataseries?

      From architectural point of view,
      there is nothing like default 256 bars back value.
      That's is just an estimate, that stops working easily even for simple custom indicators.
      To provide the only alternative with Infinite - is another extreme, killing the whole performance.

      Could it be done in NT8?
      It sounds logical - because API should not estimate how many elements the developer will need to access in DataSeries. The API should meet requirements = listen to the developer, who sets the right value, suitable for each case.

      Such API would be well designed, professional and suitable for different needs.

      Comment


        #4
        Hello misova,

        Thank you for your response.

        TwoHundredAndFiftySize was found to be the most CPU friendly during the development of NinjaTrader.

        There is no word on if this would be implemented in a future release of NinjaTrader. I will forward your suggestion to our development team.

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rocketman7, Today, 01:00 AM
        0 responses
        1 view
        0 likes
        Last Post rocketman7  
        Started by wzgy0920, 04-20-2024, 06:09 PM
        2 responses
        27 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 02-22-2024, 01:11 AM
        5 responses
        32 views
        0 likes
        Last Post wzgy0920  
        Started by wzgy0920, 04-23-2024, 09:53 PM
        2 responses
        74 views
        0 likes
        Last Post wzgy0920  
        Started by Kensonprib, 04-28-2021, 10:11 AM
        5 responses
        193 views
        0 likes
        Last Post Hasadafa  
        Working...
        X