OPEN-SOURCE SCRIPT

Position Size Calculator (Jean-Guy)

90
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 FeaturesTrue 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

免責聲明

這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。