Skip to content

Instantly share code, notes, and snippets.

@flepied
Last active November 27, 2016 17:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save flepied/d49684a9bc0f7668c81467904da1c264 to your computer and use it in GitHub Desktop.
Save flepied/d49684a9bc0f7668c81467904da1c264 to your computer and use it in GitHub Desktop.
rem risk must be a variable of the indicator with the float type
rem hyper climax run: 4.5R on 3 bars
rem climax run: 3.5R on 4 bars
rem sleeping: close bellow the moving average 20
hyper = ((High - Lowest[2](low[1])) >= (4.5 * risk))
climax = ((High - Lowest[3](low[1])) >= (3.5 * risk))
sleeping = (Average[20](Close) > Close)
return sleeping coloured(0,250,0) as "MA20", climax coloured(0,0,250) as "Climax Run", hyper coloured(250,0,0) as "Hyper Climax Run"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment