Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version2
- study("Price Action HiLo Indicator R1 by JustUncleL", shorttitle="PACHiLo by JustUncleL", overlay=false)
- //
- // Version: R1
- // Author : JustUncleL
- // Date: 12-Jan-2017
- //
- // Description:
- // This study indicates Price Action of a HiLo (12ema) channel and centre line close(10ema).
- //
- // Reference:
- //
- // Modifications:
- //
- src=input(close, title="PAC Centre Source")
- pacLenL=input(12, title="PAC lower line")
- pacLenC=input(10, title="PAC Center Length")
- pacLenU=input(12, title="PAC upper line")
- //
- pacU=ema(high,pacLenU)
- pacC=ema(src,pacLenC)
- pacL=ema(low,pacLenL)
- pacE = ( (pacU > pacU[1]) and (pacC > pacC[1]) and (pacL > pacL[1]) and (close > pacL) ) ? ( ((pacU-pacC)<(pacC-pacL)) ? 1 : 0.1 ) :
- ((pacU < pacU[1]) and (pacC < pacC[1]) and (pacL < pacL[1]) and (close < pacL)) ? ( ((pacU-pacC)>(pacC-pacL))? -1 : -0.1 ) : 0.05
- pColor =pacE>0.2? blue: pacE<-0.2?red: pacE>0.09?aqua: pacE<-0.09? orange: gray
- plot(pacE,color=pColor,style=histogram,transp=20,linewidth=4)
- // eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement