xmd79

Relative Derivative

Dec 15th, 2022
142
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. //@version=5
  2. indicator(title='Relative Derivative', shorttitle='RD')
  3. src = input(close, title='source')
  4. len = input.int(2, minval=1, title='length')
  5. sm = input.int(12, minval=1, title='smooth')
  6. rd(x, y) =>
  7. ta.sma((x - x[y]) / (x * y), sm)
  8. plot(rd(src, len), color=color.new(color.yellow, 0))
  9. hline(0, color=color.white)
Advertisement
Add Comment
Please, Sign In to add comment