PROTECTED SOURCE SCRIPT
āļāļĩāđāļāļąāļāđāļāļ: ð Portafoglio con Breakeven, Commissioni e Net ROI (5 titoli)

ð Portfolio with Breakeven, Commissions & Net ROI (up to 5 Assets)
This script displays a detailed portfolio performance table directly on your chart.
It supports up to 5 tickers with customizable inputs for entry price, quantity, and commissions.
Features:
Up to 5 assets, individually enabled/disabled.
Breakeven price with commissions (fixed or %).
Displays: price, entry, qty, cost, value, gross P/L, taxes (26%), net P/L, and ROI%.
Table position customizable.
Color-coded results for quick P/L and ROI visualization.
ð Suitable for traders who need a precise overview of portfolio performance, accounting for fees and taxes.
This script displays a detailed portfolio performance table directly on your chart.
It supports up to 5 tickers with customizable inputs for entry price, quantity, and commissions.
Features:
Up to 5 assets, individually enabled/disabled.
Breakeven price with commissions (fixed or %).
Displays: price, entry, qty, cost, value, gross P/L, taxes (26%), net P/L, and ROI%.
Table position customizable.
Color-coded results for quick P/L and ROI visualization.
ð Suitable for traders who need a precise overview of portfolio performance, accounting for fees and taxes.
āđāļāļāļŠāļēāļĢāđāļāļĒāđāļāļĢāđ
ð Portfolio with Breakeven and Net ROI (Header & Rows Color)This Pine ScriptâĒ for TradingView allows you to monitor up to 5 tickers inside a dynamic table, showing in real time prices, costs, profits, and return on investment (ROI).
It is designed to provide a clear overview of your portfolio directly on the chart, with extensive options for color customization and calculation parameters.
ðđ Key Features
- Multi-ticker table (up to 5 symbols) with the ability to enable/disable each asset.
- Customizable Breakeven text color (independent from the rest of the table).
- Automatic calculations of:
- Current price
- Entry price
- Breakeven price (including commissions)
- Quantity
- Total cost (including entry commissions)
- Current position value
- Gross Profit/Loss
- CGT taxation (set individually per ticker)
- Net Profit/Loss after taxes
- Net ROI (%)
- Configurable commissions for both entry and exit:
- Fixed
- Percentage of trade value
- Full color customization:
- Header background and text
- Row background and text
- Border color and thickness
- Dedicated breakeven color
ðđ Table Settings
- Positionable in 9 areas of the chart (top/middle/bottom à left/center/right).
- Colors adjustable via the settings panel.
- Predefined columns:
1. Ticker
2. Price
3. Breakeven
4. Buy
5. Qty
6. Cost
7. Value
8. P/L
9. CGT
10. P/L Net
11. Net ROI
ðđ Purpose of the Script
To provide a portfolio monitoring dashboard directly on your chart, useful for traders and investors who want to keep track of:
- The real-time situation of their positions
- Net ROI after costs and taxes
- Breakeven levels for each symbol
The script is designed for practical and flexible use, with a clear visualization thanks to advanced color management and the tabular layout.
āđāļāļāļŠāļēāļĢāđāļāļĒāđāļāļĢāđ
Here are only the changes between the two scripts:â 1. Pine Script Version Update
From version=5 â to version=6
â 2. Removal of "CGT" column
The CGT (Capital Gain Tax) column has been removed in the new script (v6).
â 3. Removal of "P/L" gross column
In version 6, only the Net P/L is shown, not the gross P/L (P/L column).
â 4. Removal of "Tax" column
The separate Tax column has been removed. Tax calculation is now included directly in Net P/L.
â 5. Reduced number of columns
From 11 columns â to 9 columns:
Removed: P/L, CGT, Tax
Kept: Ticker, Price, Breakeven, Buy, Qty, Cost, Value, Net P/L, Net ROI
â 6. Abbreviated Ticker
In version 6, the abbreviated ticker is displayed (e.g., NVDA instead of NASDAQ:NVDA).
â 7. Added getShortTicker() function
New function to abbreviate tickers (exchange:symbol â symbol).
â 8. Improved breakeven() function
Now it only takes commissions into account and no longer adds CGT or taxes.
â 9. Customizable colors for "Net P/L" and "ROI"
The colors of Net P/L and ROI change based on the result (green for gain, red for loss), using the new function plColor() also for ROI.
â 10. Dynamic table position with switch
In v6, the table position is managed by a switch with the value table_pos.
â 11. Table creation only if barstate.islast
Optimization: the table is created/updated only on the last bar to improve performance.
â 12. Dynamic number of table rows
The table in v6 can have up to 6 rows, but rows are managed dynamically based on selected tickers (row += 1 only if useX is active).
āļŠāļāļĢāļīāļāļāđāļāļĩāđāđāļāđāļĢāļąāļāļāļēāļĢāļāđāļāļāļāļąāļ
āļŠāļāļĢāļīāļāļāđāļāļĩāđāļāļđāļāđāļāļĒāđāļāļĢāđāđāļāđāļāđāļāļ closed-source āļāļĒāđāļēāļāđāļĢāļāđāļāļēāļĄ āļāļļāļāļŠāļēāļĄāļēāļĢāļāđāļāđāđāļāđāļāļĒāđāļēāļāļāļīāļŠāļĢāļ°āđāļĨāļ°āđāļĄāđāļĄāļĩāļāđāļāļāļģāļāļąāļāđāļāđ â āđāļĢāļĩāļĒāļāļĢāļđāđāđāļāļīāđāļĄāđāļāļīāļĄāđāļāđāļāļĩāđāļāļĩāđ
āļāļģāļāļģāļāļąāļāļŠāļīāļāļāļīāđāļāļ§āļēāļĄāļĢāļąāļāļāļīāļāļāļāļ
āļāđāļāļĄāļđāļĨāđāļĨāļ°āļāļāļāļ§āļēāļĄāđāļĄāđāđāļāđāļĄāļĩāļ§āļąāļāļāļļāļāļĢāļ°āļŠāļāļāđāđāļāļ·āđāļāļāđāļāđāļŦāđāđāļāļīāļāļāļīāļāļāļĢāļĢāļĄāļāļēāļāļāļēāļĢāđāļāļīāļ, āļāļēāļĢāļĨāļāļāļļāļ, āļāļēāļĢāļāļ·āđāļāļāļēāļĒ, āļāđāļāđāļŠāļāļāđāļāļ° āļŦāļĢāļ·āļāļāļģāđāļāļ°āļāļģāļāļĢāļ°āđāļ āļāļāļ·āđāļ āđ āļāļĩāđāđāļŦāđāļŦāļĢāļ·āļāļĢāļąāļāļĢāļāļāđāļāļĒ TradingView āļāđāļēāļāđāļāļīāđāļĄāđāļāļīāļĄāļāļĩāđ āļāđāļāļāļģāļŦāļāļāļāļēāļĢāđāļāđāļāļēāļ
āļŠāļāļĢāļīāļāļāđāļāļĩāđāđāļāđāļĢāļąāļāļāļēāļĢāļāđāļāļāļāļąāļ
āļŠāļāļĢāļīāļāļāđāļāļĩāđāļāļđāļāđāļāļĒāđāļāļĢāđāđāļāđāļāđāļāļ closed-source āļāļĒāđāļēāļāđāļĢāļāđāļāļēāļĄ āļāļļāļāļŠāļēāļĄāļēāļĢāļāđāļāđāđāļāđāļāļĒāđāļēāļāļāļīāļŠāļĢāļ°āđāļĨāļ°āđāļĄāđāļĄāļĩāļāđāļāļāļģāļāļąāļāđāļāđ â āđāļĢāļĩāļĒāļāļĢāļđāđāđāļāļīāđāļĄāđāļāļīāļĄāđāļāđāļāļĩāđāļāļĩāđ
āļāļģāļāļģāļāļąāļāļŠāļīāļāļāļīāđāļāļ§āļēāļĄāļĢāļąāļāļāļīāļāļāļāļ
āļāđāļāļĄāļđāļĨāđāļĨāļ°āļāļāļāļ§āļēāļĄāđāļĄāđāđāļāđāļĄāļĩāļ§āļąāļāļāļļāļāļĢāļ°āļŠāļāļāđāđāļāļ·āđāļāļāđāļāđāļŦāđāđāļāļīāļāļāļīāļāļāļĢāļĢāļĄāļāļēāļāļāļēāļĢāđāļāļīāļ, āļāļēāļĢāļĨāļāļāļļāļ, āļāļēāļĢāļāļ·āđāļāļāļēāļĒ, āļāđāļāđāļŠāļāļāđāļāļ° āļŦāļĢāļ·āļāļāļģāđāļāļ°āļāļģāļāļĢāļ°āđāļ āļāļāļ·āđāļ āđ āļāļĩāđāđāļŦāđāļŦāļĢāļ·āļāļĢāļąāļāļĢāļāļāđāļāļĒ TradingView āļāđāļēāļāđāļāļīāđāļĄāđāļāļīāļĄāļāļĩāđ āļāđāļāļāļģāļŦāļāļāļāļēāļĢāđāļāđāļāļēāļ