PROTECTED SOURCE SCRIPT
Updated

Q Average Cost

1 532
Calculated the average cost of the shares in the market. If close > indicator, means the market average share cost is below the close, this is a bullish sign. Otherwise, the market average share cost is above the close, which is a bearish sign.

Currently not feasible for index ETF (eg. SPY) or leveraged ETF (eg. TQQQ).

Will update code in later versions.
Release Notes
Fixed a bug. Also add an Offset which allows users to adjust the average price due to TV's finance data error sometimes.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.