OPEN-SOURCE SCRIPT
Average Price Calculator / Visualizer

DCA Average Price Calculator - Visualize Your Breakeven & TP!
Ever wished you could visualize your trades and instantly see your average entry price right here on TradingView? Especially if you're a DCA (Dollar-Cost Averaging) trader like me, tracking multiple entries can be a hassle. You're constantly switching to a spreadsheet or calculator to figure out your breakeven and take-profit levels. Well I've developed this DCA Average Price Calculator to solve exactly that problem, bringing all your position planning directly onto your chart.
What It Does
This indicator is a interactive tool designed to calculate the weighted average price of up to 10 separate trade entries. It then plots your crucial breakeven (average price) and a customizable take-profit target directly on your chart, giving you a clear visual of your position.
Key Features
Up to 10 Order Entries: Plan complex DCA strategies with support for up to ten individual buys.
Flexible Size Input: Enter your position size in either USD Amount or Number of Shares/Contracts. The script is smart enough to know which one you're using.
Instant Average Price Calculation: Your weighted average price (your breakeven point) is calculated and plotted in real-time as a clean yellow line.
Customizable Take-Profit Target: Set your desired profit percentage and see your take-profit level instantly plotted as a green line.
Detailed On-Chart Labels: Each order you plot is marked with a detailed label showing the entry price, the number of shares purchased, and the total USD value of that entry.
Clean & Uncluttered UI: The main Average and TP labels are intelligently shifted to the right, ensuring they don't overlap with your entry markers, keeping your chart readable.
How to Use It - Simple Steps
Add the indicator to your chart.
Open the script's 'Settings' menu.
In the 'Take Profit' section, set your desired profit percentage (e.g., 1 for 1%).
Under the 'Orders' section, begin filling in your entries. For each 'Order #', enter the Price.
Next, enter the size. You can either fill in the 'Size (USD)' box OR the '/ Shares' box. Leave the one you're not using at 0.
As you add orders, the 'Avg' (yellow) and 'TP' (green) lines, along with the blue order labels, will automatically appear and adjust on your chart!
Who Is This For?
DCA Traders: This is the ultimate tool for you!
Position Traders: Keep track of scaling into a larger position over time.
Manual Backtesters: Quickly simulate and visualize how a series of buys would have played out.
Any Trader who wants a quick and easy way to calculate their average entry without leaving TradingView.
I built this tool to improve my own trading workflow, and I hope it helps you as much as it has helped me. If you find it useful, please consider giving it a 'Like' and feel free to leave any feedback or suggestions in the comments!
Happy trading
Ever wished you could visualize your trades and instantly see your average entry price right here on TradingView? Especially if you're a DCA (Dollar-Cost Averaging) trader like me, tracking multiple entries can be a hassle. You're constantly switching to a spreadsheet or calculator to figure out your breakeven and take-profit levels. Well I've developed this DCA Average Price Calculator to solve exactly that problem, bringing all your position planning directly onto your chart.
What It Does
This indicator is a interactive tool designed to calculate the weighted average price of up to 10 separate trade entries. It then plots your crucial breakeven (average price) and a customizable take-profit target directly on your chart, giving you a clear visual of your position.
Key Features
Up to 10 Order Entries: Plan complex DCA strategies with support for up to ten individual buys.
Flexible Size Input: Enter your position size in either USD Amount or Number of Shares/Contracts. The script is smart enough to know which one you're using.
Instant Average Price Calculation: Your weighted average price (your breakeven point) is calculated and plotted in real-time as a clean yellow line.
Customizable Take-Profit Target: Set your desired profit percentage and see your take-profit level instantly plotted as a green line.
Detailed On-Chart Labels: Each order you plot is marked with a detailed label showing the entry price, the number of shares purchased, and the total USD value of that entry.
Clean & Uncluttered UI: The main Average and TP labels are intelligently shifted to the right, ensuring they don't overlap with your entry markers, keeping your chart readable.
How to Use It - Simple Steps
Add the indicator to your chart.
Open the script's 'Settings' menu.
In the 'Take Profit' section, set your desired profit percentage (e.g., 1 for 1%).
Under the 'Orders' section, begin filling in your entries. For each 'Order #', enter the Price.
Next, enter the size. You can either fill in the 'Size (USD)' box OR the '/ Shares' box. Leave the one you're not using at 0.
As you add orders, the 'Avg' (yellow) and 'TP' (green) lines, along with the blue order labels, will automatically appear and adjust on your chart!
Who Is This For?
DCA Traders: This is the ultimate tool for you!
Position Traders: Keep track of scaling into a larger position over time.
Manual Backtesters: Quickly simulate and visualize how a series of buys would have played out.
Any Trader who wants a quick and easy way to calculate their average entry without leaving TradingView.
I built this tool to improve my own trading workflow, and I hope it helps you as much as it has helped me. If you find it useful, please consider giving it a 'Like' and feel free to leave any feedback or suggestions in the comments!
Happy trading
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
오픈 소스 스크립트
진정한 트레이딩뷰 정신에 따라 이 스크립트 작성자는 트레이더가 기능을 검토하고 검증할 수 있도록 오픈소스로 공개했습니다. 작성자에게 찬사를 보냅니다! 무료로 사용할 수 있지만 코드를 다시 게시할 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.