OPEN-SOURCE SCRIPT
업데이트됨 Normalized Portfolio Tracker

This script lets you create, visualize, and track a custom portfolio of up to 15 assets directly on TradingView.
It calculates a synthetic "portfolio index" by combining multiple tickers with user-defined weights, automatically normalizing them so the total allocation always equals 100%.
All assets are scaled to a common starting point, allowing you to compare your portfolio’s performance versus any benchmark like SPY, QQQ, or BTC.
🚀 Goal
This script helps traders and investors:
• Understand the combined performance of their portfolio.
• Normalize diverse assets into a single synthetic chart.
• Make portfolio-level insights without relying on external spreadsheets.
🎯 Use Cases
• Backtest your portfolio allocations directly on the chart.
• Compare your portfolio vs. benchmarks like SPY, QQQ, BTC.
• Track thematic baskets (commodities, EV supply chain, regional ETFs).
• Visualize how each component contributes to overall performance.
📊 Features
• Weighted Portfolio Performance: Combines selected assets into a synthetic value series.
• Base Price Alignment: Each asset is normalized to its starting price at the chosen date.
• Dynamic Portfolio Table: Displays symbols, normalized weights (%), equivalent shares (based on each asset’s start price, sums to 100 shares), and a total row that always sums to 100%.
• Multi-Asset Support: Works with stocks, ETFs, indices, crypto, or any TradingView-compatible symbol.
⚙️ Configuration
Flexible Portfolio Setup
• Add up to 15 assets with custom weight inputs.
• You can enter any arbitrary numbers (e.g. 30, 15, 55).
• The script automatically normalizes all weights so the total allocation always equals 100%.
Start Date Selection
• Choose any custom start date to normalize all assets.
• The portfolio value is then scaled relative to the main chart symbol, so you can directly compare portfolio performance against benchmarks like SPY or QQQ.
Chart Styles
• Candlestick chart
• Heikin Ashi chart
• Line chart
Custom Display
• Adjustable colors and line widths
• Optionally display asset list, normalized weights, and equivalent shares
⚙️ How It Works
• Fetch OHLC data for each asset.
• Normalizes weights internally so totals = 100%.
• Stores each asset’s base price at the selected start date.
• Calculates equivalent “shares” for each allocation.
• Builds a synthetic portfolio value series by summing weighted contributions.
• Renders as Candlestick, Heikin Ashi, or Line chart.
• Adds a portfolio info table for clarity.
⚠️ Notes
• This script is for visualization only. It does not place trades or auto-rebalance.
• Weight inputs are automatically normalized, so you don’t need to enter exact percentages.
It calculates a synthetic "portfolio index" by combining multiple tickers with user-defined weights, automatically normalizing them so the total allocation always equals 100%.
All assets are scaled to a common starting point, allowing you to compare your portfolio’s performance versus any benchmark like SPY, QQQ, or BTC.
🚀 Goal
This script helps traders and investors:
• Understand the combined performance of their portfolio.
• Normalize diverse assets into a single synthetic chart.
• Make portfolio-level insights without relying on external spreadsheets.
🎯 Use Cases
• Backtest your portfolio allocations directly on the chart.
• Compare your portfolio vs. benchmarks like SPY, QQQ, BTC.
• Track thematic baskets (commodities, EV supply chain, regional ETFs).
• Visualize how each component contributes to overall performance.
📊 Features
• Weighted Portfolio Performance: Combines selected assets into a synthetic value series.
• Base Price Alignment: Each asset is normalized to its starting price at the chosen date.
• Dynamic Portfolio Table: Displays symbols, normalized weights (%), equivalent shares (based on each asset’s start price, sums to 100 shares), and a total row that always sums to 100%.
• Multi-Asset Support: Works with stocks, ETFs, indices, crypto, or any TradingView-compatible symbol.
⚙️ Configuration
Flexible Portfolio Setup
• Add up to 15 assets with custom weight inputs.
• You can enter any arbitrary numbers (e.g. 30, 15, 55).
• The script automatically normalizes all weights so the total allocation always equals 100%.
Start Date Selection
• Choose any custom start date to normalize all assets.
• The portfolio value is then scaled relative to the main chart symbol, so you can directly compare portfolio performance against benchmarks like SPY or QQQ.
Chart Styles
• Candlestick chart
• Heikin Ashi chart
• Line chart
Custom Display
• Adjustable colors and line widths
• Optionally display asset list, normalized weights, and equivalent shares
⚙️ How It Works
• Fetch OHLC data for each asset.
• Normalizes weights internally so totals = 100%.
• Stores each asset’s base price at the selected start date.
• Calculates equivalent “shares” for each allocation.
• Builds a synthetic portfolio value series by summing weighted contributions.
• Renders as Candlestick, Heikin Ashi, or Line chart.
• Adds a portfolio info table for clarity.
⚠️ Notes
• This script is for visualization only. It does not place trades or auto-rebalance.
• Weight inputs are automatically normalized, so you don’t need to enter exact percentages.
릴리즈 노트
Fix: Hide zero-weight items in info table.릴리즈 노트
Dynamic Weight Redistribution: Now automatically redistributes unavailable assets' weights proportionally among available assets to maintain 100% portfolio allocation. This ensures accurate portfolio performance comparison within years of period by preventing start price mismatches when some assets don't exist during the analysis period.오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.