Advertisement
Guest User

Market Facilitation Index [custom TradingView indicator]

a guest
Apr 21st, 2014
745
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.65 KB | None | 0 0
  1. //
  2. // @author LazyBear
  3. // @credits http://en.wikipedia.org/wiki/Market_facilitation_index
  4. //
  5. // If you use this code in its original/modified form, do drop me a note.
  6. //
  7. study("Market Facilitation Index [LazyBear]", shorttitle="MFIndex_LB", overlay=true)
  8. plot_offs=input(0.005, title="Indicator offset % (below low)")
  9. r_hl=roc((high-low)/volume,1)
  10. r_v=roc(volume,1)
  11. green_f= (r_hl > 0) and (r_v > 0)
  12. fade_f=(r_hl < 0) and (r_v < 0)
  13. fake_f=(r_hl > 0) and (r_v < 0)
  14. squat_f=(r_hl < 0) and (r_v > 0)
  15. b_color = green_f ? green : fade_f ? blue : fake_f ? gray : squat_f ? red : na
  16. plot(low - (low*plot_offs), color=b_color, style=circles, linewidth=4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement