Created
April 5, 2020 20:49
-
-
Save barnjamin/2b709e4ea1d73a4cef2a9fb7f069d454 to your computer and use it in GitHub Desktop.
Best Attempt at replicating the Buddy Carter Expected Range
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Replicated from here: https://twitter.com/BuddyCA64525731/status/1246051013557211136 | |
study("BuddyCarterRange", "BCR", overlay=true) | |
atr_lb = input(title="ATR Lookback", defval=60, minval=1, type=input.integer) | |
sma_lb = input(title="SMA Lookback", defval=10, minval=1, type=input.integer) | |
bc_range = atr(atr_lb) * sma(tr(true)/atr(atr_lb), sma_lb)/2 | |
top = close + bc_range | |
bottom = close - bc_range | |
plot(top, color=color.red, offset=1) | |
plot(bottom, color=color.green, offset=1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment