• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MaximumBarsLookBack for specific indicator variables?

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

    MaximumBarsLookBack for specific indicator variables?

    On a chart with Time Frame > Bars to Load > 3000, a custom moving average indicator plots four lines with variables calculated on values both under 256 bars and over 256, for example, values of 50, 100, 200, and 400 bars. If MaximumBarsLookBack is set to 256, memory is optimized, but the 400 variable line does not plot. If MaximumBarsLookBack is set to Infinite, all lines plot but memory is not optimized. Is it possible to define MaximumBarsLookBack for each individual variable of an indicator so that values under 256 realize resource utilization benefits from MaximumBarsLookback 256, while only values over 256 use MaximumBarsLookback Infinite? If individual variable configuration is not available, is it possible to set MaximumBarsLookBack to a value other than 256 or Infinite, say to 400 in this case?

    #2
    Hello Lancer,

    MaximumBarsLookBack is set for the Strategy which loads the data and provides this to the indicator. MaximumBarsLookBack can be set in State.SetDefaults of the Strategy's OnStateChange method.

    If a hosted indicator is calling AddDataSeries for an added series and sets MaximumBarsLookBack, the host strategy will also need to add that same series and both scripts will need to explicitly use the same MaximumBarsLookBack in the code.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      That's good info for future use, but it's unclear how that specifically answers my current two questions.

      Comment


        #4
        Hello Lancer,

        MaximumBarsLookBack is applied to Series.

        If the series has MaximumBarsLookBack.Infinite applied, the indicator will be using that setting for that series.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Is it possible to set MaximumBarsLookBack to a value other than 256 or Infinite, say to 400 in this case?

          Comment


            #6
            Hello Lancer,

            No, the MaximumBarsLookBack enum only has two values TwoHundredFiftySix and Infinite.

            Below is a link to the help guide where this is defined.
            https://ninjatrader.com/support/help...rslookback.htm
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Thank you.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by saltminer, Today, 06:11 PM
              0 responses
              2 views
              0 likes
              Last Post saltminer  
              Started by epitoma, Today, 05:21 PM
              1 response
              14 views
              0 likes
              Last Post NinjaTrader_ShawnB  
              Started by BatBart, Today, 01:24 PM
              1 response
              22 views
              0 likes
              Last Post NinjaTrader_Melissa  
              Started by ezrakoper, Today, 03:05 PM
              1 response
              8 views
              0 likes
              Last Post NinjaTrader_ChelseaB  
              Started by asmmbillah, Today, 02:23 PM
              1 response
              17 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X