PROTECTED SOURCE SCRIPT
מעודכן

Make & Track An Index — Custom Weighted (by Quinn Millegan)

12
Fixed pinescript security call issue limiting to 40 calls
הערות שחרור
Build your own weighted index or portfolio tracker from any combination of tickers.
Enter symbols and their weights (in percent, decimals, or fractions — e.g. 50,30,20 or 1/2,1/3,1/6) and this script will calculate and plot your custom index value in real time.

✅ Features

Unlimited symbols via simple CSV entry (e.g. AAPL,MSFT,NVDA,AMZN).

Flexible weighting input — supports percentages, decimals, or fractions.

Optional normalization to make weights sum to 100%.

Color-coded trend detection (blue for up, purple for down).

Optional real-time Price Table showing each component’s price and weight.

Built-in alert condition when the index crosses above its 20-bar SMA.

💡 Example
For a portfolio of AAPL 50, MSFT 40, and NVDA 10, the script produces an index value of roughly 345.34 (as of Oct 2025).

⚙️ Usage

Open the indicator on any chart.

Type your tickers into the Tickers (CSV) box.

Optionally specify Weights (CSV) in any format.

Toggle “Normalize Weights” if you want the total to equal 100%.

This tool was developed by Quinn Millegan of the Woodworth Contrarian Fund to visualize weighted portfolios, custom benchmarks, or thematic baskets (e.g. “AI Index,” “Cloud SaaS Basket,” etc.).

כתב ויתור

המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.