OPEN-SOURCE SCRIPT
PnL Tracker

This script allows you to manually input the details for up to 64 unique positions in the settings, each requiring a Symbol, Average Cost, and Quantity (Qty).
Key Features:
Average Cost Line: Plots a horizontal line on the chart corresponding to your recorded Average Cost for the security currently being viewed.
Real-Time PnL Label: A dynamic label attached to the Average Cost line provides an instant summary of your PnL in both percentage and currency for the last visible bar.
Detailed PnL Box: Displays a consolidated, easy-to-read table in the bottom-right corner of the chart, clearly showing:
The Symbol and Quantity of your position.
Your Average Cost.
The current PnL in percentage (%) and base currency (e.g., USD, EUR).
Visibility Controls: Toggles in the settings allow you to show or hide the Average Cost line and the PnL summary box independently.
This tool is perfect for actively managing and visualizing your multi-asset portfolio positions without leaving your main trading chart. Simply enter your positions in the indicator's settings, and the script will automatically track the PnL for the symbol matching the current chart.
Key Features:
Average Cost Line: Plots a horizontal line on the chart corresponding to your recorded Average Cost for the security currently being viewed.
Real-Time PnL Label: A dynamic label attached to the Average Cost line provides an instant summary of your PnL in both percentage and currency for the last visible bar.
Detailed PnL Box: Displays a consolidated, easy-to-read table in the bottom-right corner of the chart, clearly showing:
The Symbol and Quantity of your position.
Your Average Cost.
The current PnL in percentage (%) and base currency (e.g., USD, EUR).
Visibility Controls: Toggles in the settings allow you to show or hide the Average Cost line and the PnL summary box independently.
This tool is perfect for actively managing and visualizing your multi-asset portfolio positions without leaving your main trading chart. Simply enter your positions in the indicator's settings, and the script will automatically track the PnL for the symbol matching the current chart.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.
סקריפט קוד פתוח
ברוח TradingView אמיתית, היוצר של הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יכולים לבדוק ולאמת את הפונקציונליות שלו. כל הכבוד למחבר! למרות שאתה יכול להשתמש בו בחינם, זכור שפרסום מחדש של הקוד כפוף לכללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם אמורים להיות, ואינם מהווים, עצות פיננסיות, השקעות, מסחר או סוגים אחרים של עצות או המלצות שסופקו או מאושרים על ידי TradingView. קרא עוד בתנאים וההגבלות.