Created
November 16, 2019 07:01
-
-
Save marketcalls/9b949a41d9338f893e446a2d2134e088 to your computer and use it in GitHub Desktop.
Colored ADX histogram Bars
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
//Coded by Rajandran R - Founder Marketcalls | |
//www.marketcalls.in - July 2019 | |
//Email ID : [email protected] | |
_SECTION_BEGIN("Colored ADX histogram Bars"); | |
Plot(20,"",colorBlue, styleDashed | styleThick | styleNoLabel); | |
range = Param("Periods", 10, 2, 200, 1 ); | |
iadx = HMA(ADX(range),10); | |
inc = iadx > Ref(iadx,-1); | |
dec = iadx < Ref(iadx,-1); | |
SetChartBkColor(ColorBlend(colorGrey40,colorBlack)); | |
color = IIf(inc AND iadx >40, colorBlue, IIf(inc AND iadx > 30, colorGreen, IIf(inc AND iadx > 20,colorbrightGreen, IIf(inc, colorPaleGreen, | |
IIf(dec AND iadx >40, colorBrown, IIf(dec AND iadx > 30 , colorDarkRed, IIf(dec AND iadx > 20 , colorRed, IIf(dec, colorLightOrange,colorGrey40)))))))); | |
Plot( iadx, _DEFAULT_NAME(), color, styleHistogram | styleThick ) ; | |
_SECTION_END(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment