As i can see, you used Basic Functions (iClose,iOpen and ..) like MQL4 which doesn't work in MQL5
it just return the handle of memory. then Close>Open is wrong and you should assign the handle to an array using CopyBuffer. take a look at CopyBuffer() in help or this site.
hopefully it will lead you the way
This indicator colors candles according on volume(climax candles). How to change it so that if previous bar was climax bar and current bar is ...whatever? At the moment it controls current bar.
CopyBuffer looks too complicated for me, I'm not a coder. I decided to use iCustom.
How can I tell that I want to control "Dnv" value for the last bar not current bar?
double Dnv=iCustom(Symbol(),0,"vol indi",2,i); if(Open[i]<Close[i] && Dnv!=0)
Edit: got it to work!!
This indicator colors candles according on volume(climax candles). How to change it so that if previous bar was climax bar and current bar is ...whatever? At the moment it controls current bar.