I create a instruction for draw a rectangle when detect a difference between the price of close and the open of the next candle, but the indicator create a rectangle in all the candles. I don´t know if i use the correct instruction.
I use "if" and "Draw.Rectangle"
if(Open[0] != Close[1]);
openPrice = Open[0];
closePrice = Close[1];
Draw.Rectangle(this, "gap"+CurrentBar, true, 1, closePrice, 0, openPrice, Brushes.Blue, Brushes.Blue, 80);
Probably I have any error in the instructions?
Thanks in advance
Comment