Is there a way to do this without using a for(i.....barcount) loop?
up = cross(C, EMA(C,10));
dn = cross(EMA(C,10), C));
marker is an array (0 to barcount-1) that is "1" on certain bars, other bars is zero.
I want to output array to be:
0 until first up encountered - then set output to 1
1 from then on until dn==1
then output to be zero until marker==1
then output==1 until dn==1
then output to be zero until marker==1
..... and so on....
I couldnt work out how to do it not using a for...loop.