potomacapitol

TSI Spread - false move indicator

257
Yellow on top during an upward slope = false move
Confirmation @ Vertex to push slope from up to down, with yellow on top

Credit to the worst fund manager east of the Mississippi ;)
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
//:P
study("TSI Spread - false move indicator", shorttitle="TSI Spread")
long = input(title="Long Length", type=integer, defval=30)
short = input(title="Short Length", type=integer, defval=6)
signal = input(title="Signal Length", type=integer, defval=13)
price = close
double_smooth(src, long, short) =>
    fist_smooth = ema(src, long)
    ema(fist_smooth, short)
pc = change(price)
double_smoothed_pc = double_smooth(pc, long, short)
double_smoothed_abs_pc = double_smooth(abs(pc), long, short)
tsi_value = 100 * (double_smoothed_pc / double_smoothed_abs_pc)
plot(tsi_value, color=yellow, linewidth=3)
hline(0, title="Zero")

//////

long2 = input(title="Long2 Length", type=integer, defval=25)
short2 = input(title="Short2 Length", type=integer, defval=6)
signal2 = input(title="Signal2 Length", type=integer, defval=13)
double_smooth2(src, long2, short2) =>
    fist_smooth2 = ema(src, long2)
    ema(fist_smooth2, short2)
pc2 = change(price)
double_smoothed_pc2 = double_smooth2(pc2, long2, short2)
double_smoothed_abs_pc2 = double_smooth(abs(pc2), long2, short2)
tsi_value2 = 100 * (double_smoothed_pc2 / double_smoothed_abs_pc2)
plot(tsi_value2, color=blue, linewidth=3)

//////////

long3 = input(title="Long3 Length", type=integer, defval=19)
short3 = input(title="Short3 Length", type=integer, defval=13)
signal3 = input(title="Signal3 Length", type=integer, defval=13)
double_smooth3(src, long3, short3) =>
    fist_smooth3 = ema(src, long3)
    ema(fist_smooth3, short3)
pc3 = change(price)
double_smoothed_pc3 = double_smooth3(pc3, long3, short3)
double_smoothed_abs_pc3 = double_smooth3(abs(pc3), long3, short3)
tsi_value3 = 100 * (double_smoothed_pc3 / double_smoothed_abs_pc3)
plot(tsi_value3, color=fuchsia, linewidth=2)