Advertisement
ImDerekD_

TV_Source

Jun 2nd, 2020
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. //@version=3
  2. study(shorttitle = "Liquidity", title="Liquidity in market")
  3.  
  4. minuteSeriesVolume = security(tickerid, "1", volume)
  5. minuteSeriesHLCC = security(tickerid, "1", ((high+low+close+close)/4))
  6.  
  7. moneyprice = vwap
  8. hlcc=minuteSeriesHLCC
  9.  
  10. moneyflow=vwap*minuteSeriesVolume
  11. mmm=minuteSeriesHLCC*minuteSeriesVolume
  12. previousMoneyFlow=vwap[1]*minuteSeriesVolume[1]
  13.  
  14. liquidity = (mmm-moneyflow)
  15.  
  16. val = linreg(liquidity - avg(avg(highest(liquidity, 5), lowest(liquidity, 5)), sma(liquidity,5)), 5, 0)
  17.  
  18. plot(liquidity, color=iff(liquidity > 0, lime, red), style=histogram, linewidth=2)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement