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

Which "MaximumBarsLookBack" for this case

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

    Which "MaximumBarsLookBack" for this case

    Hi,

    Every time that I start a Strategy, it should read all historical data for once, in order to get some "key point prices" that it will save to be used later, then after that, I just must evaluate every new bar, so I don't need to access object bar more than 256, so, having said this, and being aware that MaximumBarsLookBack as infinite consumes too much memory, I'm wondering if there's some way to read all historical data without setting MaximumBarsLookBack.Infinite.

    I'm sure that this is very simple to answer for you

    Thanks in advance

    #2
    It looks like that "DaysToLoad" might be an affordable solution in case I had a huge database.

    What do you think? is it compatible with 256 MaximumBack Bars set ?

    Comment


      #3
      Hello pstrusi,

      Thank you for your post.

      I'm wondering if there's some way to read all historical data without setting MaximumBarsLookBack.Infinite.
      There is no means around this. Either you want to calculate over all the data or only the last 256 bars. DaysToLoad will not be a work around for this.

      Please let me know if you have any questions.

      Comment


        #4
        Originally posted by pstrusi View Post
        Hi,

        Every time that I start a Strategy, it should read all historical data for once, in order to get some "key point prices" that it will save to be used later, then after that, I just must evaluate every new bar, so I don't need to access object bar more than 256, so, having said this, and being aware that MaximumBarsLookBack as infinite consumes too much memory, I'm wondering if there's some way to read all historical data without setting MaximumBarsLookBack.Infinite.

        I'm sure that this is very simple to answer for you

        Thanks in advance
        If, at any point, you are never actually processing anything more than 256 bars ago, it should not matter. The price data is processed in a stream, and will process historical data in that manner. In other words, if you do not need to load ALL the data BEFORE you start processing, then the historical data is processed as it is read, so if you are not referencing more than 256 bars, you are postulating a problem that is non-existent.
        Last edited by koganam; 11-28-2017, 07:49 AM. Reason: Corrected spelling.

        Comment


          #5
          Thanks Koganam, you're absolutely right, I'm under great stress overwhelmed and I didn't realize it.

          Regards

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by NRITV, Today, 01:15 PM
          0 responses
          1 view
          0 likes
          Last Post NRITV
          by NRITV
           
          Started by quantismo, Yesterday, 05:13 PM
          2 responses
          16 views
          0 likes
          Last Post quantismo  
          Started by maybeimnotrader, Yesterday, 05:46 PM
          4 responses
          24 views
          0 likes
          Last Post maybeimnotrader  
          Started by frankthearm, Today, 09:08 AM
          6 responses
          26 views
          0 likes
          Last Post frankthearm  
          Started by adeelshahzad, Today, 03:54 AM
          5 responses
          33 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Working...
          X