|
This EA is just a clever way of drawing lines based on the CCI values as given by:
cciTrendNow = iCCI(NULL, 0, 50, PRICE_TYPICAL, i);
cciTrendPrevious = iCCI(NULL, 0, 50, PRICE_TYPICAL, i+1);
It has been defined previously in the code that st = 0;
Then, you have
if (cciTrendNow >= st && cciTrendPrevious < st) {
TrendUp[i+1] = TrendDown[i+1];
}
if (cciTrendNow <= st && cciTrendPrevious > st) {
TrendDown[i+1] = TrendUp[i+1];
}
Thus, just put in your own EA the equivalent of the CCI functions and consider it trendup signal when
cciTrendNow >= 0 && cciTrendPrevious < 0
and trenddown signal when
cciTrendNow <= st && cciTrendPrevious > st
This indicator is nothing more but a fancy way of showing on the screen CCI crossing the 0 line.
|