DM sir,
I want make AFL , buy generated when DISP moving average (30,15 ) croses EMA 15.. & SEll generated when ema15 crosses DISP moving average (30, 15)..
I have learn to make crossover of simple Moving average from this thread but i m not able to make DISP moving average crossover AFL..
I request u to help whenever u get free time..
regds
I want make AFL , buy generated when DISP moving average (30,15 ) croses EMA 15.. & SEll generated when ema15 crosses DISP moving average (30, 15)..
I have learn to make crossover of simple Moving average from this thread but i m not able to make DISP moving average crossover AFL..
I request u to help whenever u get free time..
regds
Period = Param("Period", 30, 1,200);
Shift = Param("Shift", 15, -200,200);
DISP_SMA = Ref(MA(C, Period), -Shift);
EMA1 = ema(C, 15);
Buy = cross(DISP_SMA, EMA1);
Sell = cross(EMA1,DISP_SMA);
To plot DISP_SMA, do this
Plot( MA(C, Period), "DMA", ColorRed, styleLine, 0, 0, Shift);