Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.93 KB | None | 0 0
  1. //@version=3
  2. study("QuantNomad - Pivot Points Alerts", overlay=true)
  3.  
  4. //
  5. // author: QuantNomad
  6. // date: 2019-06-17
  7. // Pivot Points Alerts
  8. // https://www.tradingview.com/u/QuantNomad/
  9. // https://t.me/quantnomad
  10. //
  11.  
  12. leftBars = input(4)
  13. rightBars = input(2)
  14.  
  15. swh = pivothigh(leftBars, rightBars)
  16. swl = pivotlow(leftBars, rightBars)
  17.  
  18. swh_cond = not na(swh)
  19. swl_cond = not na(swl)
  20.  
  21. plotshape(swh_cond, color = green, style = shape.arrowdown, location = location.abovebar, transp = 90)
  22. plotshape(swl_cond, color = red, style = shape.arrowup, location = location.belowbar, transp = 90)
  23.  
  24. plotshape(swh_cond, text = "PH - SELL", color = green, style = shape.arrowdown, location = location.abovebar, offset = -rightBars)
  25. plotshape(swl_cond, text = "PL - BUY", color = red, style = shape.arrowup, location = location.belowbar, offset = -rightBars)
  26.  
  27. alertcondition(swh_cond, "PH", "PH")
  28. alertcondition(swl_cond, "PL", "PL")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement