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 Christopher_R, Today, 12:29 AM
          0 responses
          6 views
          0 likes
          Last Post Christopher_R  
          Started by sidlercom80, 10-28-2023, 08:49 AM
          166 responses
          2,234 views
          0 likes
          Last Post sidlercom80  
          Started by thread, Yesterday, 11:58 PM
          0 responses
          3 views
          0 likes
          Last Post thread
          by thread
           
          Started by jclose, Yesterday, 09:37 PM
          0 responses
          7 views
          0 likes
          Last Post jclose
          by jclose
           
          Started by WeyldFalcon, 08-07-2020, 06:13 AM
          10 responses
          1,414 views
          0 likes
          Last Post Traderontheroad  
          Working...
          X