Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Getting the highest point from Barsarray[1] not loading the proper lookback

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

    Getting the highest point from Barsarray[1] not loading the proper lookback

    Hi,
    I added a second timeframe to my strategy and am trying to get the highest point from a specific range from the second timeframe.

    All appears to be ok..except for one thing. The lookback period is not functioning properly. I have set it to 722 bars and it appear to be loading just the last 24.

    Initialize
    Add(PeriodType.Minute, 60);

    OBU
    private int FibLookBack = 722;

    if (BarsInProgress == 1)
    {
    minLookback = MIN(Lows[1], FibLookBack)[1];
    maxLookback = MAX(Highs[1], FibLookBack)[1];
    PrintWithTimeStamp("Max is" + maxLookback);
    }


    Any idea how I can fix this?

    #2
    Hello nikolaalx,

    Thank you for your post.

    I see no issue with your code. How are you confirming that the lookBack is not running the full period?

    Comment


      #3
      Yes,
      from the printed output I see that the calculaiton is not corresponding to the highest/lowest values for the whole lookback period.

      Instead of the 722 period, it appears to be looking back just 20 bars.


      Originally posted by NinjaTrader_PatrickH View Post
      Hello nikolaalx,

      Thank you for your post.

      I see no issue with your code. How are you confirming that the lookBack is not running the full period?

      Comment


        #4
        Hello nikolaalx,

        Can you provide the code used for the Output and the actual Output as well?

        Comment


          #5
          I have disconnected from market replay and connected to real time Continuum in order to provide you the real output values..and it appears the bug was solved.

          Is there a particular reason why this has happened while in market replay mode...or it was rather a glitch?

          Anyway, It seems to have been solved, thank you for the help and the quick response!

          Originally posted by NinjaTrader_PatrickH View Post
          Hello nikolaalx,

          Can you provide the code used for the Output and the actual Output as well?

          Comment


            #6
            Hello nikolaalx,

            Thank you for your response.

            Was Market Replay loading enough bars? How many bars were on the chart in Market Replay?

            Comment


              #7
              There were plenty of bars. On the chart itself (I was able to see only the default bars) there were well more than enough.

              Sorry for the stupid question, but should I have loaded also the second timeframe on the same chart and does that make any difference?

              Comment


                #8
                Originally posted by nikolaalx View Post
                There were plenty of bars. On the chart itself (I was able to see only the default bars) there were well more than enough.

                Sorry for the stupid question, but should I have loaded also the second timeframe on the same chart and does that make any difference?
                If the second time-frame needed reloading of data that would be a good practice, there's a known limitation reloading historical data per our loading rules for the internally added series. Our next major platform update will improve the handling here.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                0 responses
                580 views
                0 likes
                Last Post Geovanny Suaza  
                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                0 responses
                335 views
                1 like
                Last Post Geovanny Suaza  
                Started by Mindset, 02-09-2026, 11:44 AM
                0 responses
                102 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                0 responses
                554 views
                1 like
                Last Post Geovanny Suaza  
                Started by RFrosty, 01-28-2026, 06:49 PM
                0 responses
                552 views
                1 like
                Last Post RFrosty
                by RFrosty
                 
                Working...
                X