SHARE
TWEET

POC ma slope

a guest Sep 27th, 2015 161 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. study(title = "POC bands 2.0 Slope", shorttitle="POCB_S", overlay=false)
  2. resCustom = input(title="Timeframe", type=resolution, defval="240")
  3. Length = input(6, minval=1)
  4. xPrice = security(tickerid, resCustom, hlc3)
  5. xvnoise = abs(xPrice - xPrice[1])
  6. nfastend = 0.666
  7. nslowend = 0.0645
  8. nsignal = abs(xPrice - xPrice[Length])
  9. nnoise = sum(xvnoise, Length)
  10. nefratio = iff(nnoise != 0, nsignal / nnoise, 0)
  11. nsmooth = pow(nefratio * (nfastend - nslowend) + nslowend, 2)
  12. nAMA = nz(nAMA[1]) + nsmooth * (xPrice - nz(nAMA[1]))
  13. basis = nAMA
  14. slope = change(basis, 1)
  15. signalcolor = slope > slope[1] ? yellow : orange
  16. plot(slope, style=histogram, color=signalcolor, transp=40)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top