Here is a Tradingview Pinescript that I call "Portfolio Snapshot". It is based on two other separate scripts that I combined, modified and simplified - shoutout to RedKTrader (Portfolio Tracker - Table Version) and FriendOfTheTrend (Portfolio Tracker For Stocks & Crypto) for their inspiration and code. I was using both of these scripts, and decided to combine the two and increase the number of stocks to 20. I was looking for an easy way to track my entire portfolio (scattered across 5 accounts) PnL on a total and stock basis. PnL - that's it, very simple by design. The features are:

1) Track PnL across multiple accounts, from inception and current day.
2) PnL is reported in two tables, at the portfolio level and individual stock level
3) Both tables can be turned on/off and placed anywhere on the chart.
4) Input up to 20 assets (stocks, crypto, ETFs)

The user has to manually calculate total shares and average basis for stocks in multiple accounts, and then inputs this in the user input dialog. I update mine as each trade is made, or you can just update once a week or so.

I've pre-loaded it with the major indices and sector ETFs, plus URA, GLD, SLV. 100 shares of each, and prices are based on the close Jan 2 2024. So if you don't want to track your portfolio, you can use it to track other things you find interesting, such as annual performance of each sector.

PNLportfolioPortfolio managementportfoliotrackerstatisticsstocktracker

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟

إخلاء المسؤولية