Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- study("QuantNomad - Pivot Points Alerts", overlay=true)
- //
- // author: QuantNomad
- // date: 2019-06-17
- // Pivot Points Alerts
- // https://www.tradingview.com/u/QuantNomad/
- // https://t.me/quantnomad
- //
- leftBars = input(4)
- rightBars = input(2)
- swh = pivothigh(leftBars, rightBars)
- swl = pivotlow(leftBars, rightBars)
- swh_cond = not na(swh)
- swl_cond = not na(swl)
- plotshape(swh_cond, color = green, style = shape.arrowdown, location = location.abovebar, transp = 90)
- plotshape(swl_cond, color = red, style = shape.arrowup, location = location.belowbar, transp = 90)
- plotshape(swh_cond, text = "PH - SELL", color = green, style = shape.arrowdown, location = location.abovebar, offset = -rightBars)
- plotshape(swl_cond, text = "PL - BUY", color = red, style = shape.arrowup, location = location.belowbar, offset = -rightBars)
- alertcondition(swh_cond, "PH", "PH")
- alertcondition(swl_cond, "PL", "PL")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement