OPEN-SOURCE SCRIPT
Position Size Calculator (Jean-Guy)

Overview Most traders fail because they don't account for the "hidden" costs of trading [cite: 2026-02-09]. This indicator is a high-precision risk management tool designed to show you your True Net Result before you even click the "Buy" or "Sell" button.
By integrating exchange fees directly into the position sizing logic, this script reveals the gap between your theoretical profit and what actually hits your account.
Key Features • True Net R/R & P&L: Automatically calculates your Reward/Risk ratio and Profit/Loss by subtracting entry and exit fees. • Dual Risk Management: Choose to risk a fixed dollar amount ($) or a precise percentage (%) of your total bag. • Execution HUD: A clean table in the top-right corner displays Margin Required, Leverage, and Net Outcomes. • Optimized UI: Includes a "Safety Margin" row at the top to prevent TradingView's hover menu from hiding your R/R data. • High-Visibility Visuals: 90% opacity zones for entry/SL/TP to help you align with your market structure.
Advantages & Disadvantages
PROS ✅ • Fee Integration: Set your specific exchange fee % (default 0.1%). • Net Reality: Shows you that a $100 risk is actually a $108.1 loss after fees—keeping you disciplined. • Visual Alignment: The fixed box helps you stay focused on your Discount/Premium zones [cite: 2026-01-23].
CONS ❌ • Manual Input: Does not sync with TradingView's built-in Long/Short drawing tools. • Static Box: The visual representation remains at the current price area and doesn't scroll. • Initial Setup: Requires entering prices manually once before moving lines via settings.
How to use
Set your account balance and risk level.
Enter your Entry, Stop Loss, and Take Profit prices.
Check the R/R NET (in green). If it doesn't fit your strategy, skip the trade [cite: 2026-01-23].
Use the Margin Req. and Leverage data to fill your exchange order form exactly.
Update V2 :
- Added Lots/Units Display: The dashboard now calculates and shows the exact position size in Lots/Units for faster order execution.
- Fixed Opacity Bug: Implemented a forced cleanup logic (line.delete) to prevent color stacking. Your zones will now maintain a consistent transparency over time.
- New Default Visibility: Set the native opacity to 90 for a cleaner, non-intrusive look that keeps price action visible.
- Code Optimization: Improved script stability for the multi-asset backtesting phase
By integrating exchange fees directly into the position sizing logic, this script reveals the gap between your theoretical profit and what actually hits your account.
Key Features • True Net R/R & P&L: Automatically calculates your Reward/Risk ratio and Profit/Loss by subtracting entry and exit fees. • Dual Risk Management: Choose to risk a fixed dollar amount ($) or a precise percentage (%) of your total bag. • Execution HUD: A clean table in the top-right corner displays Margin Required, Leverage, and Net Outcomes. • Optimized UI: Includes a "Safety Margin" row at the top to prevent TradingView's hover menu from hiding your R/R data. • High-Visibility Visuals: 90% opacity zones for entry/SL/TP to help you align with your market structure.
Advantages & Disadvantages
PROS ✅ • Fee Integration: Set your specific exchange fee % (default 0.1%). • Net Reality: Shows you that a $100 risk is actually a $108.1 loss after fees—keeping you disciplined. • Visual Alignment: The fixed box helps you stay focused on your Discount/Premium zones [cite: 2026-01-23].
CONS ❌ • Manual Input: Does not sync with TradingView's built-in Long/Short drawing tools. • Static Box: The visual representation remains at the current price area and doesn't scroll. • Initial Setup: Requires entering prices manually once before moving lines via settings.
How to use
Set your account balance and risk level.
Enter your Entry, Stop Loss, and Take Profit prices.
Check the R/R NET (in green). If it doesn't fit your strategy, skip the trade [cite: 2026-01-23].
Use the Margin Req. and Leverage data to fill your exchange order form exactly.
Update V2 :
- Added Lots/Units Display: The dashboard now calculates and shows the exact position size in Lots/Units for faster order execution.
- Fixed Opacity Bug: Implemented a forced cleanup logic (line.delete) to prevent color stacking. Your zones will now maintain a consistent transparency over time.
- New Default Visibility: Set the native opacity to 90 for a cleaner, non-intrusive look that keeps price action visible.
- Code Optimization: Improved script stability for the multi-asset backtesting phase
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.