I would like to see an indicator that marks or HIGHs and LOWs on the chart. Is this already available? If not, can we have this done, please?
I would love to see this HHLL indicator from ThinkorSwim on Tradovate
Can someone put this into Tradovate Java Script?
see below the TOS usethink script
declare lower;
input length = 20;
input over_bought = 60;
input signal_line = 50;
input over_sold = 10;
input averageType = AverageType.EXPONENTIAL;
Assert(length > 1, "‘length’ must be greater than one: " + length);
def HH = if high > high[1] then (high - Lowest(high, length)) / (Highest(high, length) - Lowest(high, length)) else 0;
def LL = if low < low[1] then (Highest(low, length) - low) / (Highest(low, length) - Lowest(low, length)) else 0;
plot HHS = 100 * MovingAverage(averageType, HH, length);
plot LLS = 100 * MovingAverage(averageType, LL, length);
plot OverBought = over_bought;
plot SignalLine = signal_line;
plot OverSold = over_sold;
HHS.SetDefaultColor(GetColor(6));
LLS.SetDefaultColor(GetColor(5));
OverBought.SetDefaultColor(GetColor(7));
SignalLine.SetDefaultColor(GetColor(7));
OverSold.SetDefaultColor(GetColor(7));
AddLabel (yes, HHS, Color.WHITE);
AddLabel(yes, LLS, Color.RED);