I was looking to add MTF to my Aroon indicator and found this thread. It's great.
https://usethinkscript.com/threads/converting-indicator-to-multi-timeframe-mtf-in-thinkorswim.8050/
But, I tried it and it does not work.
I'm on a Daily Chart and I wanted Aroon to plot for the Week. Here's what I got. any help will be appreciated:
declare lower;
input length = 25;
input agg = AggregationPeriod.Week;
def close = close(period = agg);
Assert(length > 0, "'length' must be positive: " + length);
plot Up = (length - 1 - GetMaxValueOffset(high, length)) * 100.0 / (length - 1);
plot Down = (length - 1 - GetMinValueOffset(low, length)) * 100.0 / (length - 1);
plot OverBought = 70;
plot OverSold = 30;
Up.SetDefaultColor(GetColor(1));
Down.SetDefaultColor(GetColor(5));
OverBought.SetDefaultColor(GetColor(8));
OverSold.SetDefaultColor(GetColor(8));
AddCloud(if Up > 90 and Down < 10 then Up else Double.NEGATIVE_INFINITY, if Up > 90 and Down < 10 then Down else Double.NEGATIVE_INFINITY, Color.CYAN);
AddCloud(if Up < 10 and Down > 90 then Down else Double.NEGATIVE_INFINITY, if Up < 10 and Down > 90 then Up else Double.NEGATIVE_INFINITY, Color.MAGENTA);
https://usethinkscript.com/threads/converting-indicator-to-multi-timeframe-mtf-in-thinkorswim.8050/
But, I tried it and it does not work.
I'm on a Daily Chart and I wanted Aroon to plot for the Week. Here's what I got. any help will be appreciated:
declare lower;
input length = 25;
input agg = AggregationPeriod.Week;
def close = close(period = agg);
Assert(length > 0, "'length' must be positive: " + length);
plot Up = (length - 1 - GetMaxValueOffset(high, length)) * 100.0 / (length - 1);
plot Down = (length - 1 - GetMinValueOffset(low, length)) * 100.0 / (length - 1);
plot OverBought = 70;
plot OverSold = 30;
Up.SetDefaultColor(GetColor(1));
Down.SetDefaultColor(GetColor(5));
OverBought.SetDefaultColor(GetColor(8));
OverSold.SetDefaultColor(GetColor(8));
AddCloud(if Up > 90 and Down < 10 then Up else Double.NEGATIVE_INFINITY, if Up > 90 and Down < 10 then Down else Double.NEGATIVE_INFINITY, Color.CYAN);
AddCloud(if Up < 10 and Down > 90 then Down else Double.NEGATIVE_INFINITY, if Up < 10 and Down > 90 then Up else Double.NEGATIVE_INFINITY, Color.MAGENTA);
Last edited by a moderator: