Calculation across the last 100 bars only

Forums ProRealTime English forum ProBuilder support Calculation across the last 100 bars only

Viewing 2 posts - 1 through 2 (of 2 total)
  • #15246

    Hi all,

    How do I restrict the code of my indicator to be executed across the last 100 bars only? I do not want the code to be executed over the entire number of bars on the chart. ONLY the last 100 bars.

    I am new to ProBuilder coding language and would appreciate any assistance to my question.

    #15267

    Seems quite difficult, since the history is only loaded once and at that time we can’t know if the current bar is the last (the current candlestick) is really the last one. So even with a loop, I have no solution now .. If you are using the 10.3 version, you could make a loop through the last 100 bars only while restricting your indicator to launch its calculation only at last bar (drawonlastbaronly).

Viewing 2 posts - 1 through 2 (of 2 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login