OPEN-SOURCE SCRIPT

SBC Protfo

141
SBC Portfo PNL Indicator

Description
The SBC Portfo PNL Indicator is a user-friendly tool designed for Hebrew-speaking traders to track the Profit and Loss (PNL) of their stock portfolios on TradingView charts. It supports up to 5 distinct portfolios, each capable of holding an unlimited number of stocks with unlimited buy commands, allowing real-time monitoring of portfolio performance.

Key Features
- Multi-Portfolio Support: Track up to 5 separate portfolios for different trading strategies or accounts.
- Unlimited Stock Entries: Add unlimited stocks and buy commands per portfolio.
- Detailed Buy Commands: Input for each stock:
- Stock Ticker (e.g., AAPL, TSLA).
- Buy Price (e.g., 150.25).
- Buy Amount (e.g., 10).
- Hebrew-Friendly Interface: Intuitive settings dialog with clear instructions in Hebrew.
- Customizable PNL Tracking: Visualize PNL on charts with real-time updates based on market data.

How to Use
1. Add the Indicator:
- Go to the Indicators menu in TradingView and add the "SBC Portfo" PNL Indicator.
2. Configure Portfolios:
- Open the indicator’s settings dialog.
- For each portfolio (up to 5), enter data in the provided input fields using this format:
PortfolioName:StockTicker:BuyPricexBuyAmount;StockTicker:BuyPricexBuyAmount
Example:
Portfolio1:AAPL:150.25x10;TSLA:266.72x5
- This represents a portfolio named "Portfolio1" with:
- 10 shares of AAPL bought at $150.25.
- 5 shares of TSLA bought at $266.72.
- Repeat for additional portfolios (e.g., Portfolio2, Portfolio3).
- Add multiple buy commands for the same stock if needed (e.g., AAPL:160.50x20).
3. Apply Settings:
- Save settings to display PNL based on current market prices.
4. Monitor PNL:
- View PNL for each portfolio on the chart via tables, labels, or graphical overlays (based on settings).

Input Format
Enter portfolio data manually in the settings dialog, one input field per portfolio:
PortfolioName:StockTicker:BuyPricexBuyAmount;StockTicker:BuyPricexBuyAmount
- PortfolioName: Unique name (e.g., Portfolio1, Growth).
- StockTicker: Stock symbol (e.g., AAPL).
- BuyPrice: Purchase price per share (e.g., 150.25).
- BuyAmount: Number of shares (e.g., 10).
- Use
: to separate portfolio name, ticker, and buy data
x to separate price and amount
; for multiple stocks in the portfolio

Example:
- Portfolio 1: GrowthPortfolio:AAPL:150.25x10;TSLA:266.72x5
- Portfolio 2: DividendPortfolio:KO:55.20x50;PG:145.30x30

Notes
- Hebrew Support: Settings and labels are optimized for Hebrew users.
- Manual Input: Enter portfolio data manually in the settings dialog using the correct format.
- Compatibility: Works with any stock ticker supported by TradingView.

תיאור אינדיקטור SBC Portfo PNL הוא כלי ידידותי למשתמש שתוכנן במיוחד עבור סוחרים דוברי עברית למעקב אחר רווח והפסד (PNL) של תיקי המניות שלהם ישירות בגרפים של TradingView. הוא תומך בעד 5 תיקים נפרדים, כאשר כל תיק יכול להכיל מספר בלתי מוגבל של מניות עם פקודות קנייה בלתי מוגבלות, ומאפשר מעקב בזמן אמת אחר ביצועי התיק.

תכונות עיקריות
- תמיכה בריבוי תיקים: מעקב אחר עד 5 תיקים נפרדים עבור אסטרטגיות מסחר או חשבונות שונים.
- רישום מניות ללא הגבלה: הוספת מספר בלתי מוגבל של מניות ופקודות קנייה לכל תיק.
- פקודות קנייה מפורטות: הזנת נתונים עבור כל מניה:
- סימול המניה (למשל, AAPL, TSLA).
- מחיר קנייה (למשל, 150.25).
- כמות קנייה (למשל, 10).
- ממשק ידידותי לעברית: חלונית הגדרות אינטואיטיבית עם הוראות ברורות בעברית.
- מעקב PNL הניתן להתאמה: הצגת רווח והפסד בגרפים עם עדכונים בזמן אמת בהתבסס על נתוני השוק.

כיצד להשתמש
1. הוספת האינדיקטור:
- נווט לתפריט האינדיקטורים ב-TradingView והוסף את "SBC Portfo PNL Indicator".
2. הגדרת תיקים:
- פתח את חלונית ההגדרות של האינדיקטור.
- עבור כל תיק (עד 5), הזן נתונים בשדות המסופקים בפורמט הבא:
PortfolioName:StockTicker:BuyPricexBuyAmount;StockTicker:BuyPricexBuyAmount
לדוגמה:
Portfolio1:AAPL:150.25x10;TSLA:266.72x5

שורה זו מייצגת תיק בשם "Portfolio1" עם:
- 10 מניות של AAPL שנקנו ב-$150.25.
- 5 מניות של TSLA שנקנו ב-$266.72.
- חזור על התהליך עבור תיקים נוספים (למשל, Portfolio2, Portfolio3).
- ניתן להוסיף פקודות קנייה מרובות לאותה מניה לפי הצורך (למשל, AAPL:160.50x20).

3. החלת ההגדרות:
- שמור את ההגדרות להצגת ה-PNL בהתבסס על מחירי השוק הנוכחיים.
4. מעקב אחר PNL:
- צפה ב-PNL עבור כל תיק בגרף באמצעות טבלאות, תוויות או שכבות גרפיות (בהתאם להגדרות).

פורמט קלט הזן נתוני תיק ידנית בחלונית ההגדרות, שדה קלט אחד לכל תיק: PortfolioName:StockTicker:BuyPricexBuyAmount;StockTicker:BuyPricexBuyAmount

PortfolioName: שם ייחודי (למשל, Portfolio1, Growth).
StockTicker: סימול המניה (למשל, AAPL).
BuyPrice: מחיר רכישה למניה (למשל, 150.25).
BuyAmount: מספר המניות (למשל, 10).

השתמש ב-
: להפרדה בין שם התיק, סימול ונתוני קנייה
x להפרדה בין מחיר וכמות
; להפרדה בין מניות מרובות

דוגמה:
- תיק 1: GrowthPortfolio:AAPL:150.25x10;TSLA:266.72x5
- תיק 2: DividendPortfolio:KO:55.20x50;PG:145.30x30


Release Notes
Version 1.1 includes:
- Calculations for extended hours (Pre-Market & After-Hours).
- Option to display portfolio summary data for stocks not in the portfolio (enable via settings checkbox).
- Table background for better visibility; click to bring table to the front.
- Updated text strings (names, titles, tooltips).

הערות
תמיכה בעברית: ההגדרות והתוויות מותאמות למשתמשים דוברי עברית.
הזנה ידנית: הזן נתוני תיק ידנית בחלונית ההגדרות תוך שימוש בפורמט הנכון.
תאימות: עובד עם כל סימול מניה הנתמך על ידי TradingView.


גרסה 1.1 מכילה:
1. חישובים כוללים שעות מסחר מורחבות (Pre-Market ו-After-Hours).
2. אפשרות להציג נתוני תיק כוללים עבור מניות שאינן בתיק (הפעל באמצעות תיבת סימון בהגדרות).
3. צבע רקע לטבלה לשיפור הנראות; לחיצה על הטבלה מביאה אותה לחזית.
4. תיקון נוסחים (שמות, כותרות, וטולטיפים).

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.