I use print statements to monitor the scripts. But want to make it more efficient wrt not printing for the entire chart when doing a recompile and applying the strategy.
Background:
1) If you use
Code: Select all
Print ("High: ", High);
2) If you use
Code: Select all
if Barstatus = 2 then Print ("High: ", High);
So far so good. Now I want to
a) Add a study-recompile with statements like 2 above, but on the initial calculation only print for the last 10 bars, and NOT then entire period for the instrument on the chart, which can be hundreds or thousands of bars
BUT
b) If I playback the chart one bar at a time, then have the print statements execute for the newest bar.
Any suggestions? I hope this makes sense.