Hi Team,
Please help me add the option to turn the ADX label on or off as needed for the particular script in the below. Thanks in advance.
### Ichimoku
input price = close;
input tenkan_period = 9;
input kijun_period = 26;
plot Tenkan = (Highest(high, tenkan_period) + Lowest(low, tenkan_period)) / 2;
plot Kijun = (Highest(high, kijun_period) + Lowest(low, kijun_period)) / 2;
Tenkan.SetDefaultColor(GetColor(1));
Kijun.SetDefaultColor(GetColor(2));
DefineGlobalColor("IchiHigh", color.green); DefineGlobalColor("IchiMid", color.gray); DefineGlobalColor("IchiLow", Color.red);
input pricecolor = yes;
### ADX
input length = 14;
input averageType = AverageType.WILDERS;
def currentADX = ADX(length);
DefineGlobalColor("ADXMaxHigh", color.magenta); DefineGlobalColor("ADXHigh", color.green); DefineGlobalColor("ADXMid", Color.orange); DefineGlobalColor("ADXLow", Color.cyan);
AddLabel (yes, (Concat("ADX Lv = ", Round(currentADX,1))),if currentADX > 40 then GlobalColor("ADXMaxHigh") else if currentADX > 20 then GlobalColor("ADXHigh") else if currentADX < 15 then GlobalColor("ADXLow") else GlobalColor("ADXMid"));
#AssignPriceColor(if currentADX > 40 then GlobalColor("ADXMaxHigh") else if currentADX > 25 then GlobalColor("ADXHigh") else if currentADX < 15 then GlobalColor("ADXLow") else GlobalColor("ADXMid"));
#AssignPriceColor(if currentADX > 40 then GlobalColor("ADXMaxHigh") else if currentADX < 20 then GlobalColor("ADXMid") else if !pricecolor then color.current else if close > Tenkan and close > Kijun then GlobalColor("IchiHigh") else if close < Kijun and close < Tenkan then GlobalColor("IchiLow") else GlobalColor("IchiMid"));
AssignPriceColor(if currentADX > 40 then GlobalColor("ADXMaxHigh") else if !pricecolor then color.current else if close > Tenkan and close > Kijun then GlobalColor("IchiHigh") else if close < Kijun and close < Tenkan then GlobalColor("IchiLow") else GlobalColor("IchiMid"));
Please help me add the option to turn the ADX label on or off as needed for the particular script in the below. Thanks in advance.
### Ichimoku
input price = close;
input tenkan_period = 9;
input kijun_period = 26;
plot Tenkan = (Highest(high, tenkan_period) + Lowest(low, tenkan_period)) / 2;
plot Kijun = (Highest(high, kijun_period) + Lowest(low, kijun_period)) / 2;
Tenkan.SetDefaultColor(GetColor(1));
Kijun.SetDefaultColor(GetColor(2));
DefineGlobalColor("IchiHigh", color.green); DefineGlobalColor("IchiMid", color.gray); DefineGlobalColor("IchiLow", Color.red);
input pricecolor = yes;
### ADX
input length = 14;
input averageType = AverageType.WILDERS;
def currentADX = ADX(length);
DefineGlobalColor("ADXMaxHigh", color.magenta); DefineGlobalColor("ADXHigh", color.green); DefineGlobalColor("ADXMid", Color.orange); DefineGlobalColor("ADXLow", Color.cyan);
AddLabel (yes, (Concat("ADX Lv = ", Round(currentADX,1))),if currentADX > 40 then GlobalColor("ADXMaxHigh") else if currentADX > 20 then GlobalColor("ADXHigh") else if currentADX < 15 then GlobalColor("ADXLow") else GlobalColor("ADXMid"));
#AssignPriceColor(if currentADX > 40 then GlobalColor("ADXMaxHigh") else if currentADX > 25 then GlobalColor("ADXHigh") else if currentADX < 15 then GlobalColor("ADXLow") else GlobalColor("ADXMid"));
#AssignPriceColor(if currentADX > 40 then GlobalColor("ADXMaxHigh") else if currentADX < 20 then GlobalColor("ADXMid") else if !pricecolor then color.current else if close > Tenkan and close > Kijun then GlobalColor("IchiHigh") else if close < Kijun and close < Tenkan then GlobalColor("IchiLow") else GlobalColor("IchiMid"));
AssignPriceColor(if currentADX > 40 then GlobalColor("ADXMaxHigh") else if !pricecolor then color.current else if close > Tenkan and close > Kijun then GlobalColor("IchiHigh") else if close < Kijun and close < Tenkan then GlobalColor("IchiLow") else GlobalColor("IchiMid"));