OPEN-SOURCE SCRIPT

Lot Size Calculator (Entry + SL) GOLD

89
Lot Size Calculator (Entry + SL)

This indicator helps traders calculate the correct position size (lots) based on risk management, using a fixed account balance and risk percentage per trade.

By providing an Entry Price and Stop-Loss Price, the script automatically computes:

Dollar risk per trade
Stop-loss distance
Risk per unit
Total position size in units
Final position size in lots (rounded to broker-compatible steps)

How It Works

Define your Account Balance.
Set your Risk % per trade (e.g., 1%).
Choose your Entry Price:
Manual input, or
Use the current market price.
Enter your Stop-Loss Price.

The indicator calculates the maximum lot size so that your loss at SL equals your predefined risk.

Key Features

Uses TradingView’s syminfo.pointvalue for accurate instrument pricing
Supports any market (Forex, indices, commodities, crypto)
Custom units per lot (FX standard, mini, micro, or custom CFD contracts)
roker-friendly lot rounding
Clean table display for quick decision-making



Ideal for traders who:



Follow strict fixed-percentage risk management
Want consistent position sizing
Trade multiple instruments with different contract sizes
This tool ensures every trade risks the same percentage of capital, regardless of stop-loss distance.

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.