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/
- // © KivancOzbilgic
- //@version=5
- indicator('Quantitative Qualitative Estimation', shorttitle='QQE', precision=4, timeframe='')
- src = input(close)
- length = input.int(14, 'RSI Length', minval=1)
- SSF = input.int(5, 'SF RSI SMoothing Factor', minval=1)
- showsignals = input(title='Show Crossing Signals?', defval=true)
- highlighting = input(title='Highlighter On/Off ?', defval=true)
- RSII = ta.ema(ta.rsi(src, length), SSF)
- TR = math.abs(RSII - RSII[1])
- wwalpha = 1 / length
- WWMA = 0.0
- WWMA := wwalpha * TR + (1 - wwalpha) * nz(WWMA[1])
- ATRRSI = 0.0
- ATRRSI := wwalpha * WWMA + (1 - wwalpha) * nz(ATRRSI[1])
- QQEF = ta.ema(ta.rsi(src, length), SSF)
- QUP = QQEF + ATRRSI * 4.236
- QDN = QQEF - ATRRSI * 4.236
- QQES = 0.0
- QQES := QUP < nz(QQES[1]) ? QUP : QQEF > nz(QQES[1]) and QQEF[1] < nz(QQES[1]) ? QDN : QDN > nz(QQES[1]) ? QDN : QQEF < nz(QQES[1]) and QQEF[1] > nz(QQES[1]) ? QUP : nz(QQES[1])
- QQF = plot(QQEF, 'FAST', color.new(color.maroon, 0), 2)
- QQS = plot(QQES, 'SLOW', color=color.new(color.blue, 0), linewidth=1)
- plot(50, color=color.new(color.gray, 0), style=plot.style_circles)
- longFillColor = highlighting ? QQEF > QQES ? color.green : na : na
- shortFillColor = highlighting ? QQEF < QQES ? color.red : na : na
- fill(QQF, QQS, title='UpTrend Highligter', color=longFillColor, transp=90)
- fill(QQF, QQS, title='DownTrend Highligter', color=shortFillColor, transp=90)
- buySignalr = ta.crossover(QQEF, QQES)
- plotshape(buySignalr and showsignals ? QQES * 0.995 : na, title='Buy', text='Buy', location=location.absolute, style=shape.labelup, size=size.tiny, color=color.new(color.green, 0), textcolor=color.new(color.white, 0))
- sellSignallr = ta.crossunder(QQEF, QQES)
- plotshape(sellSignallr and showsignals ? QQES * 1.005 : na, title='Sell', text='Sell', location=location.absolute, style=shape.labeldown, size=size.tiny, color=color.new(color.red, 0), textcolor=color.new(color.white, 0))
- alertcondition(ta.cross(QQEF, QQES), title='Cross Alert', message='QQE Crossing Signal!')
- alertcondition(ta.crossover(QQEF, QQES), title='Crossover Alarm', message='QQE BUY SIGNAL!')
- alertcondition(ta.crossunder(QQEF, QQES), title='Crossunder Alarm', message='QQE SELL SIGNAL!')
- alertcondition(ta.crossover(QQEF, 50), title='Cross 50 Up Alert', message='QQE FAST Crossing 50 UP!')
- alertcondition(ta.crossunder(QQEF, 50), title='Cross 50 Down Alert', message='QQE FAST Crossing 50 DOWN!')
- //end of this part
- //kather_S
- //@version=5
- //indicator(title='Girl Next Door 3RSI', overlay=false)
- //--RSI 1
- len = input.int(6, minval=1, title='Length')
- //src = input(close, 'Source')
- up = ta.rma(math.max(ta.change(src), 0), len)
- down = ta.rma(-math.min(ta.change(src), 0), len)
- rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - 100 / (1 + up / down)
- plot(rsi, 'rsi', color=color.new(color.green, 0))
- //--RSI 2
- len_2 = input.int(14, minval=1, title='Length 2')
- src_2 = src
- up_2 = ta.rma(math.max(ta.change(src_2), 0), len_2)
- down_2 = ta.rma(-math.min(ta.change(src_2), 0), len_2)
- rsi_2 = down_2 == 0 ? 100 : up_2 == 0 ? 0 : 100 - 100 / (1 + up_2 / down_2)
- plot(rsi_2, 'rsi_2', color=color.new(color.yellow, 0))
- //--RSI 3
- len_3 = input.int(24, minval=1, title='Length 3')
- src_3 = src
- up_3 = ta.rma(math.max(ta.change(src_3), 0), len_3)
- down_3 = ta.rma(-math.min(ta.change(src_3), 0), len_3)
- rsi_3 = down_3 == 0 ? 100 : up_3 == 0 ? 0 : 100 - 100 / (1 + up_3 / down_3)
- plot(rsi_3, 'rsi_3', color=color.new(color.red, 0))
- //--Bands
- SkyHigh = hline(80, 'Bands 2 Make Em Dance', color=color.green)
- NormH = hline(70, 'Make It Rain', color=color.yellow)
- Midway = hline(50, 'Chill Mode', color=color.gray)
- NormL = hline(30, 'Get That Dip', color=color.yellow)
- DownUnder = hline(20, 'Fill That Bag', color=color.green)
- fill(NormH, NormL, color=color.new(color.gray, 90), title='Background')
Advertisement
Add Comment
Please, Sign In to add comment