Type : Indicator, Name : MACD (DEMA)
Inputs: FastMA(8.3896), SlowMA(17.5185), MacdMA(9.0503);
Plot1(MACD(Close, FastMA, SlowMA), «MACD»);
Plot2(XAverage(MACD(Close, FastMA, SlowMA), MacdMA), «MACDAvg»);
Plot3(Plot1 — Plot2, «MADiff»);
{Alert Criteria}
If Plot3 Crosses Over 0 Then
Alert(«MACD has generated a bullish alert»)
Else
If Plot3 crosses under 0 Then
Alert(«MACD has generated a bearish alert»);
{MACD Expert Commentary}
#BeginCmtry
Commentary(ExpertMACD(Plot1));
#End;