Posted By: SFF
MACD + Flat Market Detector - 02/20/13 22:34
I tried to convert this free indicator and my current code is below.
Zorro says that "Error in 'line 22:
'FextMapBuffer6' undeclared identifier".
Why this happen?
Thanks in advance.
The original indicator.
http://www.pointzero-trading.com/FreeMetatraderDownloads/view/5
Zorro says that "Error in 'line 22:
'FextMapBuffer6' undeclared identifier".
Why this happen?
Thanks in advance.
The original indicator.
http://www.pointzero-trading.com/FreeMetatraderDownloads/view/5
Code:
function run(){
int FastEMA = 9;
int SlowEMA = 26;
int AvPeriod = 400;
var Gamma = 0.75;
vars med = series(MedPrice());
vars median = series(MACD(med,FastEMA,SlowEMA,4));
vars FextMapBuffer6 = series(median[0] - median[1]);
vars FextMapBuffer5 = series(abs(FextMapBuffer6[0]));
var flat = EMA(FextMapBuffer5,AvPeriod);
vars FextMapBuffer3 = series((flat * Gamma));
vars FextMapBuffer4 = series(0 - (flat * Gamma));
}
if(FextMapBuffer6 > FextMapBuffer3)
exitShort();
enterLong();
if(FextMapBuffer6 < FextMapBuffer4)
exitLong();
enterShort();
}
