Skip to content

Instantly share code, notes, and snippets.

@marketcalls
Last active September 19, 2021 10:17
Show Gist options
  • Select an option

  • Save marketcalls/78afbd1a04884b071b7bbe6959292360 to your computer and use it in GitHub Desktop.

Select an option

Save marketcalls/78afbd1a04884b071b7bbe6959292360 to your computer and use it in GitHub Desktop.
JNSAR Dots - Amibroker AFL Code
//JNSAR - Indicator ideated by Mr Illango (Just Nifty)
//Reference - http://tradeinniftyonly.blogspot.in/2010/09/jnsar-stop-and-reverse-trading-method.html
//Coded by Rajandran R - www.marketcalls.in
//Date - 10th Dec 2016
_SECTION_BEGIN("JNSAR");
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
Period = Param("Length",5,5,100,1);
// JNSAR = (5 days HEma+5Days CEma+5Days LEma)/15
isum = (Sum(ema(High,Period),Period) + Sum(ema(Low,Period),period) + Sum(ema(Close,Period),period));
jnsar = round(isum/15);
buy = Cross(Close, jnsar);
sell =Cross(jnsar,Close);
Short = Sell;
Cover = Buy;
color = IIf(C>jnsar,colorGreen,colorRed);
Plot(jnsar,"JNSAR",color,styleDots|styleNoLine|stylethick);
_SECTION_END();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment