OPEN-SOURCE SCRIPT
ืืขืืืื ๐ Portafoglio Verticale Personalizzabile (5 Tickers, Net ROI)

๐ Customizable Vertical Portfolio (5 Tickers, Net ROI)
Type: Pine Script v6 Indicator (TradingView)
Layout: Vertical table (up to 5 tickers + header)
๐น Features
Tracks up to 5 tickers simultaneously
Table position selectable (top, middle, bottom; left, center, right)
Customizable colors (header, rows, borders)
Optional header display
๐น Calculations
For each ticker:
Total cost = Entry price ร Qty + Entry commissions
Current value = Current price ร Qty โ Exit commissions
Net P/L = Current value โ Cost โ Taxes
Net ROI (%) = (Net P/L รท Cost) ร 100
๐น Commission & Tax
Entry/Exit: Fixed or Percentage
CGT: user-defined %, applied only on profits
๐น Output Table
| Ticker | Net P/L | Net ROI (%) |
Color-coded: Green = Profit, Red = Loss, Silver = Neutral/NA
โ Best for
Multi-asset tracking in one chart
Real-time evaluation of profits after fees & taxes
Clear, visual portfolio monitoring
Type: Pine Script v6 Indicator (TradingView)
Layout: Vertical table (up to 5 tickers + header)
๐น Features
Tracks up to 5 tickers simultaneously
Table position selectable (top, middle, bottom; left, center, right)
Customizable colors (header, rows, borders)
Optional header display
๐น Calculations
For each ticker:
Total cost = Entry price ร Qty + Entry commissions
Current value = Current price ร Qty โ Exit commissions
Net P/L = Current value โ Cost โ Taxes
Net ROI (%) = (Net P/L รท Cost) ร 100
๐น Commission & Tax
Entry/Exit: Fixed or Percentage
CGT: user-defined %, applied only on profits
๐น Output Table
| Ticker | Net P/L | Net ROI (%) |
Color-coded: Green = Profit, Red = Loss, Silver = Neutral/NA
โ Best for
Multi-asset tracking in one chart
Real-time evaluation of profits after fees & taxes
Clear, visual portfolio monitoring
ืืขืจืืช ืฉืืจืืจ
Summary of Changes Ticker Expansion:
Increased from 5 to 10 tickers, all managed dynamically using arrays instead of repeated code blocks.
Break-Even Feature:
Added a Break-Even calculation and persistent lines plotted on the chart for each ticker, showing the break-even price visually.
Global CGT:
Replaced individual per-ticker CGT inputs with a single global CGT setting applied to all tickers.
Table System Upgrade:
The table is now generated dynamically using loops, with enhanced styling options (frame color, border width, etc.).
Improved Input Organization:
Inputs are grouped under sections (โGlobal Settingsโ, โTable Styleโ, โTicker 1 SettingsโโฆโTicker 10 Settingsโ) for cleaner configuration.
Cleaner Architecture:
Replaced repeated variable definitions (use1, use2, etc.) with arrays and loops, improving efficiency, readability, and scalability.
Enhanced Visual Customization:
Added new style controls such as frame color, frame width, and improved position handling.
New Utility Function:
Introduced getBreakEvenPrice() for accurate break-even calculation considering fixed or percentage commissions.
Code Optimization:
Overall code reduced by roughly 80% redundancy, improving performance and maintainability.
ืกืงืจืืคื ืงืื ืคืชืื
ืืจืื TradingView ืืืืชืืช, ืืืืฆืจ ืฉื ืืกืงืจืืคื ืืื ืืคื ืืืชื ืืงืื ืคืชืื, ืื ืฉืกืืืจืื ืืืืืื ืืืืืง ืืืืืช ืืช ืืคืื ืงืฆืืื ืืืืช ืฉืื. ืื ืืืืื ืืืืืจ! ืืืจืืช ืฉืืชื ืืืื ืืืฉืชืืฉ ืื ืืืื ื, ืืืืจ ืฉืคืจืกืื ืืืืฉ ืฉื ืืงืื ืืคืืฃ ืืืืื ืืืืช ืฉืื ื.
ืืชื ืืืชืืจ
ืืืืืข ืืืคืจืกืืืื ืืื ื ืืืืจืื ืืืืืช, ืืืื ื ืืืืืื, ืขืฆืืช ืคืื ื ืกืืืช, ืืฉืงืขืืช, ืืกืืจ ืื ืกืืืื ืืืจืื ืฉื ืขืฆืืช ืื ืืืืฆืืช ืฉืกืืคืงื ืื ืืืืฉืจืื ืขื ืืื TradingView. ืงืจื ืขืื ืืชื ืืื ืืืืืืืืช.
ืกืงืจืืคื ืงืื ืคืชืื
ืืจืื TradingView ืืืืชืืช, ืืืืฆืจ ืฉื ืืกืงืจืืคื ืืื ืืคื ืืืชื ืืงืื ืคืชืื, ืื ืฉืกืืืจืื ืืืืืื ืืืืืง ืืืืืช ืืช ืืคืื ืงืฆืืื ืืืืช ืฉืื. ืื ืืืืื ืืืืืจ! ืืืจืืช ืฉืืชื ืืืื ืืืฉืชืืฉ ืื ืืืื ื, ืืืืจ ืฉืคืจืกืื ืืืืฉ ืฉื ืืงืื ืืคืืฃ ืืืืื ืืืืช ืฉืื ื.
ืืชื ืืืชืืจ
ืืืืืข ืืืคืจืกืืืื ืืื ื ืืืืจืื ืืืืืช, ืืืื ื ืืืืืื, ืขืฆืืช ืคืื ื ืกืืืช, ืืฉืงืขืืช, ืืกืืจ ืื ืกืืืื ืืืจืื ืฉื ืขืฆืืช ืื ืืืืฆืืช ืฉืกืืคืงื ืื ืืืืฉืจืื ืขื ืืื TradingView. ืงืจื ืขืื ืืชื ืืื ืืืืืืืืช.