I'm trying to get rectangles to appear on each occurrence of a condition.
However, try as I might, I've only been able to make them appear only on the latest occurrence of the condition. Although this is OK for live trading, I'd like to see these produced historically - each time the condition is met.
As an example, I've got a strategy with this code:
if (CrossAbove(EMA(14), Close, 1)) {DrawRectangle("My rectangle",false,10,MIN(Close,10)[0],0,MAX(Close,10)[0],Color.Green,Color.Green,3);}}
Taken from NT's Help for 'DrawRectangle':
The end bar (x axis co-ordinate) where the draw object will terminate
Any help with this will be much appreciated.
Comment