Skip to content

Instantly share code, notes, and snippets.

@cmdallas
Last active June 8, 2018 06:24
Show Gist options
  • Save cmdallas/2a8c219da67e7a02e0b080aaaad45080 to your computer and use it in GitHub Desktop.
Save cmdallas/2a8c219da67e7a02e0b080aaaad45080 to your computer and use it in GitHub Desktop.
Trading View script for the willy
study(title="TheWilly", shorttitle="TheWilly")
length = input(21, minval=1)
upper = highest(length)
lower = lowest(length)
out = 100 * (close - upper) / (upper - lower)
src = out, len = input(14, minval=1, title="Length")
out2 = ema(out, len)
plot(out, color=#00f9ff, linewidth=2)
plot(out2, title="EMA", color=#fd00ff, linewidth=2)
band1 = hline(-20)
band0 = hline(-80)
fill(band1, band0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment