Advertisement
Guest User

Untitled

a guest
Aug 10th, 2018
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. study(title="it's magic", shorttitle="@MarketMasta")
  2. n1 = input(10, "Channel Length")
  3. n2 = input(21, "Average Length")
  4. obLevel1 = input(60, "Over Bought Level 1")
  5. obLevel2 = input(53, "Over Bought Level 2")
  6. osLevel1 = input(-60, "Over Sold Level 1")
  7. osLevel2 = input(-53, "Over Sold Level 2")
  8.  
  9. ap = hlc3
  10. esa = ema(ap, n1)
  11. d = ema(abs(ap - esa), n1)
  12. ci = (ap - esa) / (0.015 * d)
  13. tci = ema(ci, n2)
  14.  
  15. wt1 = tci
  16. wt2 = sma(wt1,4)
  17.  
  18. plot(0, color=gray)
  19. plot(obLevel1, color=red)
  20. plot(osLevel1, color=green)
  21. plot(obLevel2, color=red)
  22. plot(osLevel2, color=green)
  23.  
  24. plot(wt1, color=green)
  25. plot(wt2, color=red)
  26. plot(wt1-wt2, color=blue, style=area, transp=80)
  27. plot(cross(wt1, wt2) ? wt2 : na, color = black , style = circles, linewidth = 3)
  28. plot(cross(wt1, wt2) ? wt2 : na, color = (wt2 - wt1 > 0 ? red : lime) , style = circles, linewidth = 2)
  29. barcolor(cross(wt1, wt2) ? (wt2 - wt1 > 0 ? aqua : yellow) : na)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement