Skip to main content

candlestick above sma 5 for Amibroker (AFL)

tjhailioe about 16 years ago Amibroker (AFL)

  • Rating:
    3 / 5 (Votes 10)
  • Tags:
    amibroker

Shows signals if candle above sma 5. Buy if candle above sma 5 and sell if bellow sma 5. this strategy good for short term trader,get out as soon as possible when you already get profit and when you buy don’t forget your stop loss.

I hope it useful for your trading from your friend tjhailioe@gmail.com /http://mystockdata.blogspot.com/

Screenshots

Indicator / Formula

Copy & Paste Friendly
_SECTION_BEGIN("if candle above SMA5= buy");

Buy = Cross( C,MA( Close, 5 ) );
PlotShapes(IIf(Buy==1, shapeUpArrow , shapeNone), colorBlue, 0,Low, Offset=-5);
_SECTION_END();
_SECTION_BEGIN("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() ); 
_SECTION_END();

_SECTION_BEGIN("MA");
P = ParamField("Price field",-1);
Periods = Param("Periods", 5);
Plot( MA( P, Periods ), _DEFAULT_NAME(), ParamColor( "Color", colorBlue ), ParamStyle("Style") ); 
_SECTION_END();

_SECTION_BEGIN("Volume");
Plot( Volume, _DEFAULT_NAME(), ParamColor("Color", colorLightBlue), ParamStyle( "Style", styleHistogram | styleOwnScale | styleThick, maskHistogram  ), 2 );
_SECTION_END();

GfxSetOverlayMode(0); 
GfxSelectFont("Tahoma", Status("pxheight")/15); 
GfxSetTextAlign( 6 );// center alignment 
GfxSetTextColor( ColorRGB( 200, 200, 200 ) ); 
GfxSetBkMode(3); // transparent 
GfxTextOut( Name(), Status("pxwidth")/6, Status("pxheight")/6 );

1 comments

1. sasajib
about 16 years ago

nice share….its almost perfect. I am using with pivot points…then its perfect…

Thanks for this …really great …

Leave Comment

Please login here to leave a comment.