Every time you buy a stock, someone sold it to you, so flow of money into the market isn't something that's easy to define in a meaningful way. And even if a lot of the invested capital is passive (maybe half of the US stock market), almost none of the trading is, and that's what determines prices.