Hi all,
I want to show a buy signal on chart but it shows some false signal.
cMA is the value of 19 days simple moving average while pMA is the value
of 2 days simple moving average of the previous day.
I wanna show a buy signal when cMA is greater then pMA.
Here are my coding:
cMA = MA(Close,19);
pMA = ref(MA( Close, 2),-1);
Buy=cMA>pMA;
shape = Buy * shapeUpArrow;
Plot( Close, "Price", colorRed, styleCandle );
PlotShapes( shape, IIf( Buy, colorred, shapenone ), 0, IIf( Buy, Low, High ) );
Thanks for any advice or help~~:clap:
I want to show a buy signal on chart but it shows some false signal.
cMA is the value of 19 days simple moving average while pMA is the value
of 2 days simple moving average of the previous day.
I wanna show a buy signal when cMA is greater then pMA.
Here are my coding:
cMA = MA(Close,19);
pMA = ref(MA( Close, 2),-1);
Buy=cMA>pMA;
shape = Buy * shapeUpArrow;
Plot( Close, "Price", colorRed, styleCandle );
PlotShapes( shape, IIf( Buy, colorred, shapenone ), 0, IIf( Buy, Low, High ) );
Thanks for any advice or help~~:clap: