Futures Experience: Beginner
Favorite Futures: SPY, ES, Crude
Posts: 1 since Feb 2015
Thanks: 0 given,
Determine the last bar where a cross occured.
I would like to modify "MovingAvgCrossover" to add a value, say "lastCross", to store the latest bar (or time) when
the cross happened. This will help me to sort my scan following this value.
def avg1 = MovingAverage(averageType1, price, length1);
def avg2 = MovingAverage(averageType2, price, length2);
plot signal = crosses(avg1, avg2, crossingType == CrossingType.above);
Is there a manner to do this in thinkscript?