I'm creating a simple indicator that draws a diamond when the following conditions are true.
if(Close[0] > VMAZones (9, 2, 18).Lower[0]
&& Close[0] < VMAZones (9, 2, 18).Upper[0]
&& ADX(10)[3] > 24
&& CrossBelow(DM(10).DiPlus, DM(10).DiMinus, 1))
{
DrawDiamond("Short" + CurrentBar, true, 0, High[0] + 1, Color.Red);
}
I get an error in the Log that says "Index was out of range. Must be non-negative and less than the size of the collection". I have no idea what that means. Can anyone help me out? Thanks.

Comment