OPEN-SOURCE SCRIPT
מעודכן BTC Stack Tracker

🚀 BTC Stack Tracker
Overview
The BTC Stack Tracker is a professional portfolio management tool designed for Bitcoiners who want to visualize their accumulation journey directly on the chart. Unlike standard indicators, this script allows you to input your actual trade history to calculate your personal Average Acquisition Price (Break-Even) and track your portfolio's performance in real-time. 📈
🌟 Key Features
Historical Visualization:
Displays a gapless step-line representing your average cost basis over time. 🛤️
Transaction Markers:
Automatically places Green Up-Arrows (▲) for buys and Red Down-Arrows (▼) for sells on the exact date of the transaction.
Multi-Currency Support:
Native support for EUR and USD, with a "Custom" option for any other currency (e.g., CHF, GBP). 🌍
Live Portfolio Metrics:
A clean on-screen table displaying:
Total Stack:
Current BTC balance. 💰
Invested:
Total fiat capital committed (adjusted for sells).
Value:
Current market value of your holdings.
PNL:
Unrealized profit/loss percentage. 📊
⚙️ How it Works
1. Data Input
The script parses data from two text areas (Buys and Sells).
Format: YYYY-MM-DD, Price, Sats, Note;
Price: The BTC price at the time of purchase/sale.
Sats: The amount of Satoshis (1 BTC = 100,000,000 Sats).
2. Calculation Logic
The indicator uses a Floating Average Cost methodology:
When Buying:
The cost (Sats multiplied by Price) is added to your total investment, and the Sats are added to your stack.
When Selling:
The script reduces your total stack. Crucially, it reduces the "Invested" capital proportionally. This ensures the Average Price remains stable during a sale—accurately reflecting your break-even point for the remaining coins. ⚖️
3. Seamless Plotting
To ensure a continuous line, the script carries the portfolio state forward from the very first bar. Even if no trades occur for months, the indicator maintains your last known average price across the entire timeline. ⛓️
🛠️ Settings
Currency Settings:
Choose your display currency (EUR, USD, or Custom).
Visuals:
Customize the color and opacity of the Avg Price line and markers. 🎨
Toggle Notes:
Enable or disable your personal notes (e.g., "Bot Profit") next to the chart markers. 📝
Overview
The BTC Stack Tracker is a professional portfolio management tool designed for Bitcoiners who want to visualize their accumulation journey directly on the chart. Unlike standard indicators, this script allows you to input your actual trade history to calculate your personal Average Acquisition Price (Break-Even) and track your portfolio's performance in real-time. 📈
🌟 Key Features
Historical Visualization:
Displays a gapless step-line representing your average cost basis over time. 🛤️
Transaction Markers:
Automatically places Green Up-Arrows (▲) for buys and Red Down-Arrows (▼) for sells on the exact date of the transaction.
Multi-Currency Support:
Native support for EUR and USD, with a "Custom" option for any other currency (e.g., CHF, GBP). 🌍
Live Portfolio Metrics:
A clean on-screen table displaying:
Total Stack:
Current BTC balance. 💰
Invested:
Total fiat capital committed (adjusted for sells).
Value:
Current market value of your holdings.
PNL:
Unrealized profit/loss percentage. 📊
⚙️ How it Works
1. Data Input
The script parses data from two text areas (Buys and Sells).
Format: YYYY-MM-DD, Price, Sats, Note;
Price: The BTC price at the time of purchase/sale.
Sats: The amount of Satoshis (1 BTC = 100,000,000 Sats).
2. Calculation Logic
The indicator uses a Floating Average Cost methodology:
When Buying:
The cost (Sats multiplied by Price) is added to your total investment, and the Sats are added to your stack.
When Selling:
The script reduces your total stack. Crucially, it reduces the "Invested" capital proportionally. This ensures the Average Price remains stable during a sale—accurately reflecting your break-even point for the remaining coins. ⚖️
3. Seamless Plotting
To ensure a continuous line, the script carries the portfolio state forward from the very first bar. Even if no trades occur for months, the indicator maintains your last known average price across the entire timeline. ⛓️
🛠️ Settings
Currency Settings:
Choose your display currency (EUR, USD, or Custom).
Visuals:
Customize the color and opacity of the Avg Price line and markers. 🎨
Toggle Notes:
Enable or disable your personal notes (e.g., "Bot Profit") next to the chart markers. 📝
הערות שחרור
bugfixesהערות שחרור
optical optimizationהערות שחרור
update chart previewהערות שחרור
added possibility for OffSetהערות שחרור
added manual correctionsהערות שחרור
v3.2fixed visibility of transaction notes
הערות שחרור
v3.6Added table positioning
bugfixes
הערות שחרור
v3.7.1added more positions for the info panel
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט קוד פתוח
ברוח האמיתית של TradingView, יוצר הסקריפט הזה הפך אותו לקוד פתוח, כך שסוחרים יוכלו לעיין בו ולאמת את פעולתו. כל הכבוד למחבר! אמנם ניתן להשתמש בו בחינם, אך זכור כי פרסום חוזר של הקוד כפוף ל־כללי הבית שלנו.
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.