Advertisement
3VFF3H_MONS

Resolution commander in use with ? x : swtch

Jul 27th, 2018
259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.38 KB | None | 0 0
  1.  
  2. //@version=3
  3. //SNOW_CITY / Heffae on WP. All original code. No stealies without permission!!! Verbose Quantum RSI "Quant-RSI"
  4. study("Heffae QuantRSI v0.15",shorttitle="Heffae QuantRSI v0.15",overlay=false, scale = scale.right, precision = 5)
  5.  
  6. //_-__---_____--------
  7. // Input Block
  8.  
  9. aspectw = input(4, title = "TF_x mult(Hours if x_TF = 60)")
  10. custom_tfv = input(60, title = "x_TF")
  11. cstm_aspt = input(false, title = "Custom Aspect Len?")
  12. aspecth = input(4, title = "if^ then this = Aspect Len")
  13. relprc_input = input(4, minval = 1, maxval = 8, title = "Input Price Source")
  14. candle = input(false, title = "Show QuantRSI as Candles")
  15.  
  16.  
  17. tfrmod(baseres,tf_mult,res_step)=>
  18. resx = baseres * tf_mult
  19. rmndr = -1*(resx % res_step)
  20. divs = (max(rmndr,resx) - min(rmndr,resx))
  21. rpv4 = (((divs%10000)-((divs%10000)%1000)))+
  22. (((divs%1000)-((divs%1000)%100)))+
  23. (((divs%100)-((divs%100)%10)))+
  24. (((divs%10)-((divs%10)%1)))
  25. resvalue = tostring(rpv4, "####" )
  26.  
  27. atr_fracres = tfrmod(custom_tfv,(aspectw),1)
  28. atrres1 = tfrmod(custom_tfv,(aspectw*0.5),1)
  29. atrres2 = tfrmod(custom_tfv,(aspecth*0.5),1)
  30.  
  31. ATR1 = security(tickerid, atrres1, ATRc)
  32. ATR2 = security(tickerid, atrres2, ATRc)
  33. ATR = cstm_aspt ? ATR2 : ATR1
  34.  
  35. atrUp4_hl = security(tickerid,atr_fracres ,emahi4_hl)
  36. atr_adptv_d1 = security(tickerid,atr_fracres, f1hl)
  37. atrDn4_hl = security(tickerid,atr_fracres ,emalo4_hl)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement