Ciao , ho visto che Ehlers ha pubblicato sulla rivista TASC il nuovo indicatore MACH, indicatore MAC migliorato.
qualcuno sa codificarlo per metterlo su Pro Real Time? sto facendo una tesi di laurea su questi nuovi indicatori e non so come codificarli su ProBuilder.
lascio qua sotto i due codici scritti in EASYLANGUAGE:
{
MADH (Moving Average Difference – Hann) Indicator
(C) 2021 John F. Ehlers }
Inputs: ShortLength(8), DominantCycle(27);
Vars: LongLength(20), Filt1(0),
Filt2(0),
coef(0), count(0), MADH(0);
LongLength = IntPortion(ShortLength + DominantCycle / 2);
Filt1 = 0; coef = 0;
For count = 1 to ShortLength Begin
Filt1 = Filt1 + (1 – Cosine(360*count / (ShortLength +
1)))*Close[count – 1];
coef = coef + (1 – Cosine(360*count / (ShortLength + 1)));
End;
If coef <> 0 Then Filt1 = Filt1 / coef;
Filt2 = 0;
coef = 0;
For count = 1 to LongLength Begin
Filt2 = Filt2 + (1 – Cosine(360*count / (LongLength + 1)))*Close[count – 1];
coef = coef + (1 – Cosine(360*count / (LongLength + 1))); End;
If coef <> 0 Then Filt2 = Filt2 / coef;
//Computed as percentage of price
If Filt2 <> 0 Then MADH = 100*(Filt1 – Filt2) / Filt2;
Plot1(MADH, “”, yellow, 4, 4); Plot2(0, “”, white, 1, 1);
THE MAD (MOVING AVERAGE DIFFERENCE) INDICATOR
{ MAD (Moving Average Difference) Indicator } (C) 2021 John F. Ehlers
Inputs: ShortLength(8), LongLength(23);
Vars: MAD(0);
MAD = 100*(Average(Close, ShortLength) – Average(Close, LongLength)) / Average(Close, LongLength);
Plot1(MAD, “”, red, 4, 4); Plot2(0,””, white, 1, 1);