The MACD I got which is:
double EMA1 = EMA(Input, Fast)[0];
double EMA2 = EMA(EMA(Input, Fast), Fast)[0];
zeroEMA.Set(EMA1 + (EMA1 - EMA2));
double EMA3 = EMA(Input, Slow)[0];
double EMA4 = EMA(EMA(Input, Slow), Slow)[0];
zeroEMAs.Set(EMA3 + (EMA3 - EMA4));
double macd = zeroEMA[0] - zeroEMAs[0] ;
Now I need the same using the "macd" as input aboveto calculate the trigge for which I put:
double EMA8 = EMA(macd, smooth)[0];
double EMA9 = EMA(EMA(macd, Smooth), smooth)[0];
macdAvg.Set(EMA8 + (EMA8 - EMA9));
but that doesn't work.
Does somebody perhaps know what I have to put so it recognizes the "macd" as a "input" variable. I tried putting a "private Dataseries macd" under variables but that does nothing.
Any help would be appreciated.
Martin
Comment