Hello all,
I did not know where to start in creating labels for this indicator. I would like to have 3 separate labels for each one, that reflects its current value and color (Red/Green). It will show something like this: “RSI” in RED or Green, based on settings. Same for DMI and STO, Using these names.
Below is the code:
declare lower;
input length = 14;
#RSI Settings
plot rsi1 = if reference RSI(length = 14).”RSI” >= 50 then 10 else 9;
plot rsi2 = if reference RSI(length = 14).”RSI” < 50 then 10 else 9;
AddCloud(rsi1, rsi2, Color.Green, Color.red);
#DMI Settings
plot dmi1 = if DMI(length = 14).”DI+” >= DMI(length = 14).”DI-” then 8 else 7;
plot dmi2 = if DMI(length = 14).”DI+” < DMI(length = 14).”DI-” then 8 else 7;
AddCloud(dmi1, dmi2, Color.Green, Color.red);
#Stochastics Settings
plot sto1 = if StochasticMomentumIndex().”SMI” >= StochasticMomentumIndex().”AvgSMI” then 6 else 5;
plot sto2 = if StochasticMomentumIndex().”SMI” < StochasticMomentumIndex().”AvgSMI” then 6 else 5;
AddCloud(sto1, sto2, Color.Green, Color.red);
rsi1.SetDefaultColor(Color.GRAY);
rsi2.SetDefaultColor(Color.GRAY);
dmi1.SetDefaultColor(Color.GRAY);
dmi2.SetDefaultColor(Color.GRAY);
sto1.SetDefaultColor(Color.GRAY);
sto2.SetDefaultColor(Color.GRAY);
Like this:
Like Loading...