Pooja,
I do not take actions on volume - just wonder sometimes and ask the experts like Bunny ...
For starters, you should let the trend decide when to exit. Your own personal tweaks can happen once you are comfortable with the basic system.
I do not let any position be more than 5% of my positional capital - so the maximum stocks I would be long on is 20 to 25. I check them out visually for any exits required. If I have capital, then I need to go hunting for stocks where EMA20 crossovers have happened or if I am lazy, I know Savant will put out the futures triggers. Some of those triggers are based on EMA20 ...
I might move over to Amibroker soon - if I get the time ...
Regards,
Enygma.
Hi,
Enygma,
Here is your first afl for your Amibroker, add your "tweak" as per need.
------------------------------------------------
_SECTION_BEGIN ("Price 20EMA");
//-------Plot and explore 20EMA SGS method developed by Enygma afl by CNB------------------
GraphXSpace = 5;
//-------------- price-----------
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
//---------Indicator -------------------
Plot(EMA(C,20),"EMA C 20", colorRed,styleLine);
Plot(C,"close",ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle());
Buy = Cross(C, EMA(C, 20)); // AND Close > Open AND Avg_vol > 250000;
Sell = Cross(EMA(C, 20), C ); // AND Close < Open AND Avg_vol > 250000;
//-----------SIGNAL--------------//
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, shapeSquare, shapeNone),colorRed, 0, H, Offset=40);
PlotShapes(IIf(Sell, shapeSquare, shapeNone),colorOrange, 0,H, Offset=50);
PlotShapes(IIf(Sell, shapeDownArrow, shapeNone),colorWhite, 0,H, Offset=-45);
//--------------Explore--------
Filter=Buy OR Sell;
AddColumn(TimeFrameGetPrice( "H", inDaily),"HIGH",1.2,colorDefault,colorDefault,60);
AddColumn(TimeFrameGetPrice( "L", inDaily),"LOW",1.2,colorDefault,colorDefault,60);
AddColumn(TimeFrameGetPrice( "O", inDaily),"OPEN",1.2,colorDefault,colorDefault,60) ;
AddColumn(TimeFrameGetPrice( "C", inDaily),"CLOSE",1.2,colorDefault,colorDefault,60) ;
AddColumn(TimeFrameGetPrice( "V", inDaily),"VOLUME",1.2,colorDefault,colorDefault,60) ;
AddColumn(IIf(Buy,66,IIf(Sell,83,32)),"ACTION REQUIRED", formatChar, colorWhite, bkcolor =IIf(Buy, colorGreen,IIf(Sell,colorRed,colorDefault)));
_SECTION_END();//
//--------------------------TITLE--------------------------//
_SECTION_BEGIN("Title");
Title = EncodeColor(colorBrightGreen)+"TRADING 20EMA SGS METHOD" + "-" + Name()+ "-" + EncodeColor(colorRed)+ Interval(2) + EncodeColor(colorBlack) +
" - " + Date() +" - "+"\n" +EncodeColor(colorBlack) +"Op-"+O+" "+"Hi-"+H+" "+"Lo-"+L+" "+
"Cl-"+C+" "+ "Vol= "+ WriteVal(V);
_SECTION_END();
--------------------------------------------------------------------------
Anant and Ken I will appreciate correction/modification in the afl pl.
Regards,
CNB