dEMA is Close[0] -EMA(50)[0];
dLastEMA is Close[1] - EMA(50)[1];
if(dEMA50>0)
BaseTrend[0] = dEMA50;
if(dEMA50<0)
BaseTrend2[0] = dEMA50;
i added this to check to see if this would work. I still have this error
if(dEMA50>=0 && dLastEMA50<=0 )
BaseTrend[0] = dEMA50;
if(dEMA50<=0 && dLastEMA50>=0)
BaseTrend[0] = dEMA50;
Comment