I have following AFL
Buy = Cross(C,MA(C,35)) AND RSI(14) > 20 AND RSI(14) < 50;
Sell = Cross(MA(C,35),C);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
for (i=0;i<BarCount;i++)
{
TotBuy = Sum(Buy,i);
TotSell = Sum(Sell,i);
if( Buy) PlotText("LONG : " + totBuy + "\nBuyPrice: "+ C[ i ] , i, L[ i ]*0.9,colorBlack, colorLime );
if( Sell) PlotText("SOLD : " + totSell + "\nSalePrice: "+ C[ i ], i, H[ i ]*1.15,colorWhite, colorRed );
}
Plot(C,"close",colorBlack);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )))
);
when I plot it I find the sum of Buys signals are shown correctly but sum of sell signals are not .Can somebody help me plot sum of sell signals also
Thankyou
Buy = Cross(C,MA(C,35)) AND RSI(14) > 20 AND RSI(14) < 50;
Sell = Cross(MA(C,35),C);
Buy = ExRem(Buy,Sell);
Sell = ExRem(Sell,Buy);
for (i=0;i<BarCount;i++)
{
TotBuy = Sum(Buy,i);
TotSell = Sum(Sell,i);
if( Buy) PlotText("LONG : " + totBuy + "\nBuyPrice: "+ C[ i ] , i, L[ i ]*0.9,colorBlack, colorLime );
if( Sell) PlotText("SOLD : " + totSell + "\nSalePrice: "+ C[ i ], i, H[ i ]*1.15,colorWhite, colorRed );
}
Plot(C,"close",colorBlack);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )))
);
when I plot it I find the sum of Buys signals are shown correctly but sum of sell signals are not .Can somebody help me plot sum of sell signals also
Thankyou