Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //@version=3
- //SNOW_CITY / Heffae on WP. All original code. No stealies without permission!!! Verbose Quantum RSI "Quant-RSI"
- study("Heffae QuantRSI v0.15",shorttitle="Heffae QuantRSI v0.15",overlay=false, scale = scale.right, precision = 5)
- //_-__---_____--------
- // Input Block
- aspectw = input(4, title = "TF_x mult(Hours if x_TF = 60)")
- custom_tfv = input(60, title = "x_TF")
- cstm_aspt = input(false, title = "Custom Aspect Len?")
- aspecth = input(4, title = "if^ then this = Aspect Len")
- relprc_input = input(4, minval = 1, maxval = 8, title = "Input Price Source")
- candle = input(false, title = "Show QuantRSI as Candles")
- tfrmod(baseres,tf_mult,res_step)=>
- resx = baseres * tf_mult
- rmndr = -1*(resx % res_step)
- divs = (max(rmndr,resx) - min(rmndr,resx))
- rpv4 = (((divs%10000)-((divs%10000)%1000)))+
- (((divs%1000)-((divs%1000)%100)))+
- (((divs%100)-((divs%100)%10)))+
- (((divs%10)-((divs%10)%1)))
- resvalue = tostring(rpv4, "####" )
- atr_fracres = tfrmod(custom_tfv,(aspectw),1)
- atrres1 = tfrmod(custom_tfv,(aspectw*0.5),1)
- atrres2 = tfrmod(custom_tfv,(aspecth*0.5),1)
- ATR1 = security(tickerid, atrres1, ATRc)
- ATR2 = security(tickerid, atrres2, ATRc)
- ATR = cstm_aspt ? ATR2 : ATR1
- atrUp4_hl = security(tickerid,atr_fracres ,emahi4_hl)
- atr_adptv_d1 = security(tickerid,atr_fracres, f1hl)
- atrDn4_hl = security(tickerid,atr_fracres ,emalo4_hl)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement