Hello experts....First of all, really wanted to thank every active member here. I have been a frequent visitor of this page and have learnt lot of new things from here. The way experts help novices like me with the code and then explain their logic is really appreciated.
I am still a novice and have a query with the below code -
Cond1 = Volume > EMA(Volume, 20) * 2;
Cond2 = Volume < EMA(Volume, 20) * 0.00003;
Buy= Cond1;
Sell= Cond2;
Buy = Exrem (Buy, Sell);
Sell = Exrem (Sell, Buy);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorGreen, 0, L, Offset=-40);
PlotShapes(IIf(Buy, shapeSquare, shapeNone),colorLime, 0,L, Offset=-50);
PlotShapes(IIf(Buy, shapeUpArrow, shapeNone),colorWhite, 0,L, Offset=-45);
PlotShapes(IIf(Sell, shapeHollowDownTriangle, shapeNone),colorRed, 0,H, Offset=-65);
Filter = Buy OR Sell ;
AddColumn(C,"Close");
AddColumn(H,"High");
AddColumn(L,"Low");
AddColumn( Buy, "Buy", 1, colorDefault, IIf( Buy, colorGreen, colorDefault ) );
AddColumn( Sell, "Sell", 1, colorDefault, IIf( Sell, colorRed, colorDefault ) );
I want to explore the stocks with volume > 2x of EMA Volume of last 20 candles. The issue is-
- If I am not putting the Exrem lines, I am getting the correct output, but then I am getting more than one signal per day whenever the condition is met (which I don't want).
- If I am putting the Exrem lines, I am not getting the correct output.
Request help on this issue. Thanks