Created
November 21, 2020 12:32
-
-
Save stanwu/69265c159e141795e156d4e3b81efdf8 to your computer and use it in GitHub Desktop.
MAs for risk managememt
This file contains 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=1 | |
study(title="注意空頭", overlay=true) | |
short = sma(close, 5) | |
long = sma(close, 250) * 0.975 | |
enter_period = sma(sign(short-long)*0.1-0.1, 22)*22 | |
enter_indicator = enter_period<0?1:0 | |
plot(short, color = teal) | |
plot(long, color = orange) | |
plotarrow(enter_indicator, colorup=orange, colordown=orange, maxheight=20,transp=30) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment