Counting No Of Crossovers Using CIF Function

CIF Returns a vector representing the total number of times the specified condition evaluated to TRUE in intraday period only.

BUY{
SET CND = CROSSOVER(EMA(CLOSE,5),EMA(CLOSE,13));
CIF(CND>=1) = 2;}

LONGEXIT{
SET CND = CROSSOVER(EMA(CLOSE,5),EMA(CLOSE,13));
CIF(CND>=1) > 6;}

This slideshow requires JavaScript.

Advertisements