Hi halcyonguy,
You helped me with this script
https://usethinkscript.com/threads/inverted-ema-for-thinkorswim.10243/
and it's been working well. Thanks again.
I was wondering if you could do the same (write the script to invert moving average) on the TOS MovAvgEnvelope if you have some time.
# MovAvgEnvelope for TOS
input displace = 0;
input length = 10;
input pctAbove = 10.0;
input pctBelow = 10.0;
input priceH = close;
input priceL = close;
input averageType = AverageType.SIMPLE;
plot UpperBand = MovingAverage(averageType, priceH[-displace], length) * (1 + pctAbove / 100);
UpperBand.SetDefaultColor(GetColor(0));
plot LowerBand = MovingAverage(averageType, priceL[-displace], length) * (1 - pctBelow / 100);
lowerBand.SetDefaultColor(GetColor(0));
You helped me with this script
https://usethinkscript.com/threads/inverted-ema-for-thinkorswim.10243/
and it's been working well. Thanks again.
I was wondering if you could do the same (write the script to invert moving average) on the TOS MovAvgEnvelope if you have some time.
# MovAvgEnvelope for TOS
input displace = 0;
input length = 10;
input pctAbove = 10.0;
input pctBelow = 10.0;
input priceH = close;
input priceL = close;
input averageType = AverageType.SIMPLE;
plot UpperBand = MovingAverage(averageType, priceH[-displace], length) * (1 + pctAbove / 100);
UpperBand.SetDefaultColor(GetColor(0));
plot LowerBand = MovingAverage(averageType, priceL[-displace], length) * (1 - pctBelow / 100);
lowerBand.SetDefaultColor(GetColor(0));
Thank you in advance.
Last edited by a moderator: