OPEN-SOURCE SCRIPT
تم تحديثه

Lot Size Calculator

779
Lot Size Calculator for Gold (XAU)

This indicator helps traders calculate the proper lot size for Gold (XAU) based on their entry, stop loss, and risk amount in USD.
You can set your entry and stop levels directly on the chart, and adjust your dollar risk from the settings panel.
The indicator measures the distance between entry and stop to calculate the position size that matches your selected risk.

A clean, customizable table displays key values such as Risk, Entry, Stop, Target, Lots, and Pips.
You can easily hide specific rows, change colors, and adjust layout options to fit your chart style.

Designed specifically for Gold traders, this tool provides a simple and visual way to manage risk directly on the chart.
ملاحظات الأخبار
Lot Size Calculator for Gold

This indicator is designed exclusively for the XAUUSD symbol and will not activate on any other instrument.

It calculates the exact lot size needed so that a trade from Entry to Stop-Loss risks exactly the USD amount specified by the user.

Calculation formula

SL distance = |Entry price − Stop-Loss price|
Lot size = Risk in USD ÷ (SL distance × 100)


Features
  • Works only on XAUUSD (automatically disabled on all other symbols)
  • Entry and Stop-Loss prices are set by clicking directly on the chart
  • Target price is calculated automatically based on user-defined Risk:Reward ratio (default 1:1)
  • Visual elements: red box (risk zone), green box (reward zone), horizontal lines for Entry/Stop/Target
  • Customizable table displaying: Risk ($), Entry, Stop, Target, Lots, Pips
  • Full control over table position, colors, transparency and row visibility


How to use
  1. Apply the indicator to any XAUUSD chart
  2. When the indicator is first added, two pop-ups will appear — click on the chart to set Entry price first, then click again to set Stop-Loss price
  3. Set your desired Risk amount in USD in the settings (default $50)
  4. (Optional) Adjust the "R:R" input to change the Risk:Reward ratio — Target price will update automatically (default 1:1)
  5. Read the calculated Lot size from the table and use that exact volume in your broker

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.