Deleting Arrow
try
for(i=70; i>=0; i--) // 70 = Limit { if(Close[i+0]>Close[i+1] && Open[i+0]>Close[i+1] && Open[i+0]>Open[i+1] ) { up[i+0]=High[i+0]-100*Point; } else if(Close[i+0]<Close[i+1] && Close[i+1]>Open[i+0]&& Open[i+0]<Open[i+1] ) { dn[i+0]=Low[i+0]+100*Point; } else dn[i+0]= EMPTY_VALUE; } return(0); }
This is a small code to identify in a specific way Gap formation (as per my definition :) )
I've tried to delete the arrows after the identified GAP is closed. -The GAP is considered closed if any candle (high/low) reaches the gap-
after introducing else if dn[i+0] = 0 & up[i+0] = 0, the logic is messed up !
appreciate if you could guide on way forward to delete the arrow if GAP is closed & leave the other arrows until price closes them.
cheers