PROTECTED SOURCE SCRIPT
מעודכן Average Position Calculation (F3rd1n)

Intended to calculate the average value of multiple positions.
הערות שחרור
This indicator is a **"Break-even & Average Cost Tracker"** specifically designed for traders who scale into positions (DCA - Dollar Cost Averaging). It allows you to visualize exactly where your profit zone starts by consolidating multiple entries into one clear picture.Here are the benefits and a simple guide on how to use it:
---
🚀 Key Advantages
* **No More Manual Math:** It automatically calculates the weighted average of your positions. You don't need a calculator or spreadsheet to know your true entry price.
* **Visual Break-even Point:** The **thick blue line** on your chart shows you exactly where the market needs to go for you to start being "in the green."
* **Dual-Mode Flexibility:** Whether you track your trades by "how many units" you bought or "how much cash" you spent, the tool adapts to your workflow.
* **Clean Visuals:** Labels are pushed to the right side of the screen (into the empty space), so they never block your view of the current price action or candles.
* **Historical Context:** Your individual entry levels stay visible as thin grey lines, helping you remember your trade logic.
---
🛠️ How to Use It
Once you add the indicator to your chart, click the **Settings (gear icon)** and follow these steps:
1. Choose Your Calculation Mode
* **Amount Mode:** Choose this if you prefer to enter the **Quantity** (e.g., "I bought 10 shares at $100 and 5 shares at $120").
* **Sum Mode:** Choose this if you prefer to enter the **Total Cash Spent** (e.g., "I spent $1,000 at a price of $100 and $500 at a price of $120").
2. Enter Your Trades (Entry Groups)
* **Entry Price:** Type the price at which you bought.
* **Amount/Sum:** Depending on your mode, type either the number of units or the total money invested.
* You can input up to **5 different entries**. If you only have two, simply leave the others at zero.
3. Read the Chart
* **The Blue Line:** This is your **Average Price**. If the current candle is above this line, your total position is in profit.
* **The Grey Lines:** These mark your individual entry points for visual reference.
---
💡 Pro Tip
If the text labels feel too close to the candles, increase the **"Label Offset"** value in the settings (e.g., set it to 100) to move the data further to the right into the chart's margin.
Would you like me to add a **Profit/Loss percentage display** next to the average price so you can see your real-time ROI on the chart?
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, תוכל להשתמש בו בחופשיות וללא כל מגבלות – למד עוד כאן
Algorithmic trading possibilities beyond expectations
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, תוכל להשתמש בו בחופשיות וללא כל מגבלות – למד עוד כאן
Algorithmic trading possibilities beyond expectations
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.