Advertisement
Guest User

From Tony H Ver 1

a guest
Dec 15th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.97 KB | None | 0 0
  1. study("Twin Hull Crossover (TH)",overlay=true)
  2.  
  3. LowestPeriod = input(title="Lowest Period",type=integer,defval=8)
  4. MediumPeriod = input(title="Medium Period",type=integer,defval=10)
  5.  
  6. LowestEMA = wma(2 * wma(src, len / 2) - wma(src, len), round(sqrt(len)))
  7. MediumEMA = ema(close,MediumPeriod)
  8.  
  9. //LowestEMA = ema(close,LowestPeriod)
  10. //MediumEMA = ema(close,MediumPeriod)
  11.  
  12. LEColor = LowestEMA > LowestEMA[1] ? green : red
  13. MEColor = MediumEMA > MediumEMA[1] ? lime : maroon
  14.  
  15. plot( LowestEMA, color= LEColor , title="Lowest EMA", trackprice=false, style=line)
  16. plot( MediumEMA ,color= MEColor , title="Medium EMA", trackprice=false, style=line)
  17.  
  18. Trend = LowestEMA > MediumEMA ? 1 : LowestEMA < MediumEMA ? -1 : 0
  19. plotarrow(Trend == 1 and Trend[1] != 1 ? Trend : na, title="Up Entry Arrow", colorup=lime, maxheight=30, minheight=20, transp=0)
  20. plotarrow(Trend == -1 and Trend[1] != -1 ? Trend : na, title="Down Entry Arrow", colordown=red, maxheight=30, minheight=20, transp=0)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement