PROTECTED SOURCE SCRIPT
Universal Lot Size Calculator (Forex, Index, Metals)

Multi-functional lot size calculator with support for various instruments
🎯 MAIN FEATURES:
Universal — works with Forex, indices, metals, and custom instruments
Auto-detect — automatically detects instrument type by ticker
Precise position sizing - considering risk and currency conversions
Currency conversion — automatic conversion between deposit currencies
Advanced visualization — entry, stop-loss, take-profit lines
Smart table — convenient display of all parameters
⚙️ SETTINGS GROUPS:
📈 Instrument Settings
Instrument Type — selection: Auto, Forex, Index, Metals, Custom
Custom Contract Size — manual contract size configuration
Use Manual Exchange Rate — manual rate for currency conversion
💰 Account & Risk Settings
Deposit Currency — account currency (USD, EUR, GBP, CHF, JPY)
Account Size — deposit amount
Risk in % — risk percentage from deposit
🎯 Price Levels
Entry Price — entry price
Stop Price — stop-loss price
Target Price — take-profit price
Color settings for each line
📊 Risk/Reward Settings
Manual Target Price — manual TP setting
Show R Levels — display profit levels in R multiples
Show only last R level — show only the last R level
Number of R Levels — number of R levels (1-10)
🎨 Line Styles & Table Appearance
Line style settings (solid, dashed, dotted)
Line width
Table position and size
Color schemes
📈Supported instrument types:
Forex — standard lot 100,000
Indices — E-mini futures (US100=20, SP500=50, US30=5, DAX=25)
Metals — Gold=100 oz, Silver=5000 oz
Custom — user-defined contract size
📱 KEY FEATURES:
- Auto instrument detection:
Indices: US100, SP500, US30, DAX
Metals: XAUUSD (Gold), XAGUSD (Silver)
Forex: all currency pairs
- Smart table with key parameters:
Instrument type and contract size
Account size and risk
Entry/exit prices
Calculated lot size
- Visual elements:
Dynamic level lines
Labels with profit/loss calculations
R-levels for target prices
- Currency conversion:
Automatic rate fetching
Support for USD, EUR, GBP, CHF, JPY
Manual rate setting when needed
⚠️ IMPORTANT NOTES:
Contract sizes may vary between brokers
For CFD brokers use Custom type with Contract Size = 1
During weekends currency rates may be unavailable — use manual rate
When trading in different currencies verify conversion accuracy
🚀 HOW TO USE:
Select instrument type (Auto for auto-detection)
Set deposit size and account currency
Define risk percentage (1-100%)
Specify prices for entry, stop-loss, and take-profit
Use calculated lot to open positions
⚠️ RESETTING CALCULATIONS:
To reuse the calculator with new price levels, you need to:
Right-click on the indicator's table/chart
Select "Reset Points" from the context menu
OR manually update all three price levels (Entry, Stop Loss, Take Profit) in the settings
🎯 MAIN FEATURES:
Universal — works with Forex, indices, metals, and custom instruments
Auto-detect — automatically detects instrument type by ticker
Precise position sizing - considering risk and currency conversions
Currency conversion — automatic conversion between deposit currencies
Advanced visualization — entry, stop-loss, take-profit lines
Smart table — convenient display of all parameters
⚙️ SETTINGS GROUPS:
📈 Instrument Settings
Instrument Type — selection: Auto, Forex, Index, Metals, Custom
Custom Contract Size — manual contract size configuration
Use Manual Exchange Rate — manual rate for currency conversion
💰 Account & Risk Settings
Deposit Currency — account currency (USD, EUR, GBP, CHF, JPY)
Account Size — deposit amount
Risk in % — risk percentage from deposit
🎯 Price Levels
Entry Price — entry price
Stop Price — stop-loss price
Target Price — take-profit price
Color settings for each line
📊 Risk/Reward Settings
Manual Target Price — manual TP setting
Show R Levels — display profit levels in R multiples
Show only last R level — show only the last R level
Number of R Levels — number of R levels (1-10)
🎨 Line Styles & Table Appearance
Line style settings (solid, dashed, dotted)
Line width
Table position and size
Color schemes
📈Supported instrument types:
Forex — standard lot 100,000
Indices — E-mini futures (US100=20, SP500=50, US30=5, DAX=25)
Metals — Gold=100 oz, Silver=5000 oz
Custom — user-defined contract size
📱 KEY FEATURES:
- Auto instrument detection:
Indices: US100, SP500, US30, DAX
Metals: XAUUSD (Gold), XAGUSD (Silver)
Forex: all currency pairs
- Smart table with key parameters:
Instrument type and contract size
Account size and risk
Entry/exit prices
Calculated lot size
- Visual elements:
Dynamic level lines
Labels with profit/loss calculations
R-levels for target prices
- Currency conversion:
Automatic rate fetching
Support for USD, EUR, GBP, CHF, JPY
Manual rate setting when needed
⚠️ IMPORTANT NOTES:
Contract sizes may vary between brokers
For CFD brokers use Custom type with Contract Size = 1
During weekends currency rates may be unavailable — use manual rate
When trading in different currencies verify conversion accuracy
🚀 HOW TO USE:
Select instrument type (Auto for auto-detection)
Set deposit size and account currency
Define risk percentage (1-100%)
Specify prices for entry, stop-loss, and take-profit
Use calculated lot to open positions
⚠️ RESETTING CALCULATIONS:
To reuse the calculator with new price levels, you need to:
Right-click on the indicator's table/chart
Select "Reset Points" from the context menu
OR manually update all three price levels (Entry, Stop Loss, Take Profit) in the settings
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์ที่ได้รับการป้องกัน
สคริปต์นี้ถูกเผยแพร่เป็นแบบ closed-source อย่างไรก็ตาม คุณสามารถใช้ได้อย่างอิสระและไม่มีข้อจำกัดใดๆ – เรียนรู้เพิ่มเติมได้ที่นี่
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน