The text below is selected, press Ctrl+C to copy to your clipboard. (⌘+C on Mac) No line numbers will be copied.
Guest
WMA derivative
By Guest on 26th May 2019 12:47:28 PM | Syntax: PYTHON | Views: 3



New paste | Download | Show/Hide line no. | Copy text to clipboard
  1. //@version=3
  2. study("WMA derivative", overlay=false)
  3.  
  4. src = input(close, title="source for moving average, default is close")
  5. lens= input(50, title="length of moving average")
  6. size= input(1, title="delta T - how old WMA should be compared with current one.")
  7.  
  8. F = wma(src, lens)
  9. T = 57295827*atan((F-F[size])/size)
  10.  
  11. fill(plot(T,color=red), plot(0,title="zero"), T>0?green:red, transp=20)



  • Recent Pastes