How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Feature Request FAQ Help & Wiki Twitter

# TSI Spread - false move indicator

417 5
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 ;)
```//:P
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)```
Thanks,
Dont understand, sorry novice, please explain
signal = input(title="Signal Length", type=integer, defval=13) is declared but not used? Thanks
syracusepro
United States
United Kingdom
India
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia

한국
Home Stock Screener Forex Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter