I have an indicator that works on historical data but flatlines when put on a live chart, rather than reloading the chart by changing the units or time etc. Is there w way to make it recalculate on bar close or some other form of repainting ?
Thanks for any assistance on this.
Ryan.
If you want your indicator to recalculate only one time, just check if the Open is different from a last flagged variable:
if Open[0] <> flag then
//recalculate (paste all code of indi here)
flag=Open[0]
endif
It is a rough idea, but you should understand how you can achieve what you want.
Great question – does PRT have the ability to complete a one time “refresh” of the data at each bar close? It would be nice to know if that feature is available in PRT Charts for indicator development work.
Unless variables are never reset at each new tick received, I do not have any reliable solution for this..