PROTECTED SOURCE SCRIPT
Lot Size Calculator by MohammadReza

Overview:
Size your position from your risk in USD and the two lines you place on the chart (Entry & Stop). The script measures that price distance, draws Risk/Reward boxes, and shows a compact table with Risk, Entry, Stop, Target (from R/R), Lots, and Pips—so you instantly know what lot size to use.
How to use:
1. Add the indicator to an XAU chart.
2. Set “Risk $” in Inputs.
3. Place/adjust the Entry and Stop lines on the chart.
4. Read “Lots” in the table and trade with consistent sizing.
Inputs:
* Risk $ (your dollar risk per trade)
* Entry Price and Stop Loss (can be adjusted on chart)
* R/R (auto-calculates Target)
* Appearance options for risk/reward boxes, table position/colors, and layout
Notes:
* Gold-only display (XAU).
* Table rows can be toggled (Risk, Entry, Stop, Target, Lots, Pips).
* Fully customizable colors and widths.
* Educational tool; verify contract specs with your broker.
Size your position from your risk in USD and the two lines you place on the chart (Entry & Stop). The script measures that price distance, draws Risk/Reward boxes, and shows a compact table with Risk, Entry, Stop, Target (from R/R), Lots, and Pips—so you instantly know what lot size to use.
How to use:
1. Add the indicator to an XAU chart.
2. Set “Risk $” in Inputs.
3. Place/adjust the Entry and Stop lines on the chart.
4. Read “Lots” in the table and trade with consistent sizing.
Inputs:
* Risk $ (your dollar risk per trade)
* Entry Price and Stop Loss (can be adjusted on chart)
* R/R (auto-calculates Target)
* Appearance options for risk/reward boxes, table position/colors, and layout
Notes:
* Gold-only display (XAU).
* Table rows can be toggled (Risk, Entry, Stop, Target, Lots, Pips).
* Fully customizable colors and widths.
* Educational tool; verify contract specs with your broker.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.