Trying to create a new indicator, but having some troubles..
Let say I have a condition:
if (High [0] > High [1])
DrawRectangle("AA" + CurrentBar, false, Time[1], High[1], Time[0].AddMinutes(60), Low[1], Color.Blue, color, opacity);
Instead of this, I want to stop drawing my rectangle when the price will be below Low[1]. So I need to write down a specific condition and change Time[0].AddMinutes(60) for something like Time[???], but all my previous attempts were unsuccessful.
How I will reference to that bar in the future in general? Since the rectangle function requires int DateTime or BarsAgo, how should I allocate DateTime of that previous bar, in order to call it later and compare its Low?
Thanks a lot,
Arthur
Comment