Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
- // © joaodanielbatista
- //@version=5
- indicator(title="Pivot Stochastic", shorttitle="PivotStoch", format=format.price, precision=2, max_bars_back = 5000)
- topLine = input.int(85,title="Top Line")
- bottomLine = input.int(15,title="Bottom Line")
- kPeriod = input.int(14)
- kSmooth = input.int(3, title="Smoothing K", minval=1)
- kSmoothF = input.int(1, title="Fast Smoothing K", minval=1)
- dPeriod = input.int(3, title="Period D", minval=1)
- PP = (high + low + close) / 3
- j = ta.sma(ta.stoch(close, high, low, kPeriod), kSmoothF)
- k = ta.sma(ta.stoch(close, high, low, kPeriod), kSmooth)
- d = ta.sma(k, dPeriod)
- pSr = j * PP /100
- pSs = k * PP/100
- hLine= close*topLine / 100
- lLine= close*bottomLine / 100
- plot(pSr, title="Fast line", color=color.blue)
- plot(pSs, title="Low Line", color=color.orange)
- h1=plot(hLine, title="Top Line", color=color.yellow)
- l1=plot(lLine, title="Bottom Line", color=color.yellow)
Advertisement
Add Comment
Please, Sign In to add comment