Advertisement
JustUncleL

Price Action HiLo Indicator R1

Jan 12th, 2017
114
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.01 KB | None | 0 0
  1. //@version2
  2.  
  3. study("Price Action HiLo Indicator R1 by JustUncleL", shorttitle="PACHiLo by JustUncleL", overlay=false)
  4.  
  5. //
  6. // Version: R1
  7. // Author : JustUncleL
  8. // Date: 12-Jan-2017
  9. //
  10. // Description:
  11. // This study indicates Price Action of a HiLo (12ema) channel and centre line close(10ema).
  12. //
  13. // Reference:
  14. //
  15. // Modifications:
  16. //
  17. src=input(close, title="PAC Centre Source")
  18. pacLenL=input(12, title="PAC lower line")
  19. pacLenC=input(10, title="PAC Center Length")
  20. pacLenU=input(12, title="PAC upper line")
  21. //
  22. pacU=ema(high,pacLenU)
  23. pacC=ema(src,pacLenC)
  24. pacL=ema(low,pacLenL)
  25.  
  26. pacE = ( (pacU > pacU[1]) and (pacC > pacC[1]) and (pacL > pacL[1]) and (close > pacL) ) ? ( ((pacU-pacC)<(pacC-pacL)) ? 1 : 0.1 ) :
  27. ((pacU < pacU[1]) and (pacC < pacC[1]) and (pacL < pacL[1]) and (close < pacL)) ? ( ((pacU-pacC)>(pacC-pacL))? -1 : -0.1 ) : 0.05
  28.  
  29. pColor =pacE>0.2? blue: pacE<-0.2?red: pacE>0.09?aqua: pacE<-0.09? orange: gray
  30. plot(pacE,color=pColor,style=histogram,transp=20,linewidth=4)
  31.  
  32. // eof
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement