Created
April 6, 2018 15:14
-
-
Save bkawk/dbefb68c87d4f7dd5997ce16180bf558 to your computer and use it in GitHub Desktop.
GhostBinary
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
//@version=2 | |
study("GHOST Binary [@bkawk]", overlay = false) | |
slime = #B7ED0A | |
blood = #FF4167 | |
fastMA = input(title="Fast Period", type = integer, defval = 12) | |
slowMA = input(title="Slow Period", type = integer, defval = 26) | |
signalSmooth = input(title="Smoothing Amount", type = integer, defval = 9) | |
tf = period | |
fst = security(tickerid, tf, ema(close, fastMA)) | |
slw = security(tickerid, tf, ema(close, slowMA)) | |
data = (fst - slw) - security(tickerid, tf, ema((fst - slw), signalSmooth)) | |
color = if data > 0 | |
data > data[1] ? slime : blood | |
else | |
data < data[1] ? blood : slime | |
plot(100, style = area, color = color) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment