Created
December 20, 2014 19:21
-
-
Save marketcalls/0ac0f3c32d58caf2a6a5 to your computer and use it in GitHub Desktop.
N Bar High-Low Dots - Amibroker AFL code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* Done by Rajandran R */ | |
| /* Author of www.marketcalls.in */ | |
| _SECTION_BEGIN("N Bar High/Low Dots"); | |
| SetBarsRequired(100000,0); | |
| GraphXSpace = 15; | |
| SetChartOptions(0,chartShowArrows|chartShowDates); | |
| SetChartBkColor(ParamColor("bkcolor",ColorRGB(0,0, 0))); | |
| GfxSetBkMode(0); | |
| GfxSetOverlayMode(1); | |
| SetBarFillColor(IIf(C>O,ParamColor("Candle UP Color", colorGreen),IIf(C<=O,ParamColor("Candle Down Color", colorRed),colorLightGrey))); | |
| Plot(C,"\nPrice",IIf(C>O,ParamColor("Wick UP Color", colorDarkGreen),IIf(C<=O,ParamColor("Wick Down Color", colorDarkRed),colorLightGrey)),64,0,0,0,0); | |
| _N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) )); | |
| nhigh = Param("N Bar High", 20, 1,100,1); | |
| nlow = Param("N Bar Low", 20, 1,100,1); | |
| nhi = HHV(H,nhigh); | |
| nlow = LLV(L,nlow); | |
| hidot = IIf(nhi>Ref(nhi,-1),True,False); | |
| lowdot = IIf(nlow<Ref(nlow,-1),True,False); | |
| Plot(IIf(hidot,H,Null),"High Dots",coloryellow,style = styleDots | styleThick | stylenoline); | |
| Plot(IIf(lowdot,L,Null),"Low Dots",colororange,style = styleDots | styleThick | stylenoline); | |
| _SECTION_END(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment