Forums ProRealTime English forum ProBuilder support CalculateOnLastBars range? Reply To: CalculateOnLastBars range?

#56148

If you want to use this indicator in a system, you need to add values in the RETURN instruction, otherwise nothing are present when you are CALLing in a strategy. Seems obvious, just say .. 🙂

Of course you’ll always get the last values of the indicator, not the last X supports and resistances because we can’t build arrays, we need to define first of much variables must be defined. Not a problem when we plot them with a persistent line on a chart, but a real one when we want to store them in memory to retrieve them later..

So, in order to get the last values of your S/R:

Now you only have to call this indi into your proorder strategy. To get previous support / resistance, you can also make a loop in the past in the strategy itself:

 

1 user thanked author for this post.