Calculation of Cross(array1,array2)

This is a really dumb question, but is this function calculated like:

Ref(array1,-1)<ref(array2,-1) AND Ref(array1,0)>ref(array2,0) 


#2) Ref(array1,-1)<ref(array2,0) AND Ref(array1,0)>ref(array2,0) 
MyCross = array1 > array2 and Ref(array1, -1) <= Ref(array2, -1);
1 Like

aaa = cross(a1,a2);

aaa is set to True (numerically set to 1) on every bar where a1 crosses up through a2.
aaa is set to False (numerically set to 0) on all other bars.

1 Like