OPEN-SOURCE SCRIPT
Cập nhật Calculadora CFDs v1.2 - 2026

MT5 Lot & Margin Calculator for CFDs (Multi-Asset)
General Description
This tool is designed for CFD traders using platforms like MetaTrader 5 who need a fast and accurate way to calculate lot size (volume) before entering the market. The calculator solves the issue of varying contract sizes across different assets (Oil, Natural Gas, Gold, Forex, etc.) and precisely calculates the margin withheld by the broker.
Key Features:
Customizable Database: Pre-configure up to 20 different assets with their respective Contract Sizes. Once set, the script automatically detects the chart's ticker and applies the saved parameters.
Note: To find the correct Contract Size, go to MT5, right-click on the asset, select "Specification," and look for the "Contract Size" value.
Exact Margin Management: Calculate exactly how many lots to enter in MT5 based on the specific USD amount you want the broker to set aside as collateral (Margin). This value is fully adjustable in the settings.
Smart Leverage Logic: Includes automated logic for standard 2026 industry leverage levels (1:50 Forex, 1:10 Energies/Metals, 1:15 Cash Indices, 1:2 Crypto), with a manual override option.
High-Contrast Visualization: A clean and professional table interface with adjustable positioning on the chart (Top Right/Left, Bottom Right/Left).
Real-Time Data: All calculations are performed using the live price and data source of the ticker currently displayed on your chart.
Instructions for Use:
[]In the "Inputs" tab, enter your frequent tickers (e.g., XTIUSD, NAT.GAS) and their contract sizes according to your broker's specifications.
[]Define the "Margin to Retain" (the amount in USD you wish to use as collateral for the trade).
[]The indicator will instantly display the MT5 LOT size to enter into your trading terminal.
[]Use the "Save as Default" option in the settings to ensure your 20 assets remain saved for future sessions.
General Description
This tool is designed for CFD traders using platforms like MetaTrader 5 who need a fast and accurate way to calculate lot size (volume) before entering the market. The calculator solves the issue of varying contract sizes across different assets (Oil, Natural Gas, Gold, Forex, etc.) and precisely calculates the margin withheld by the broker.
Key Features:
Customizable Database: Pre-configure up to 20 different assets with their respective Contract Sizes. Once set, the script automatically detects the chart's ticker and applies the saved parameters.
Note: To find the correct Contract Size, go to MT5, right-click on the asset, select "Specification," and look for the "Contract Size" value.
Exact Margin Management: Calculate exactly how many lots to enter in MT5 based on the specific USD amount you want the broker to set aside as collateral (Margin). This value is fully adjustable in the settings.
Smart Leverage Logic: Includes automated logic for standard 2026 industry leverage levels (1:50 Forex, 1:10 Energies/Metals, 1:15 Cash Indices, 1:2 Crypto), with a manual override option.
High-Contrast Visualization: A clean and professional table interface with adjustable positioning on the chart (Top Right/Left, Bottom Right/Left).
Real-Time Data: All calculations are performed using the live price and data source of the ticker currently displayed on your chart.
Instructions for Use:
[]In the "Inputs" tab, enter your frequent tickers (e.g., XTIUSD, NAT.GAS) and their contract sizes according to your broker's specifications.
[]Define the "Margin to Retain" (the amount in USD you wish to use as collateral for the trade).
[]The indicator will instantly display the MT5 LOT size to enter into your trading terminal.
[]Use the "Save as Default" option in the settings to ensure your 20 assets remain saved for future sessions.
Phát hành các Ghi chú
MT5 Lot & Margin Calculator for CFDs (Multi-Asset)General Description
This tool is designed for CFD traders using platforms like MetaTrader 5 who need a fast and accurate way to calculate lot size (volume) before entering the market. The calculator solves the issue of varying contract sizes across different assets (Oil, Natural Gas, Gold, Forex, etc.) and precisely calculates the margin withheld by the broker.
Key Features:
Customizable Database: Pre-configure up to 20 different assets with their respective Contract Sizes. Once set, the script automatically detects the chart's ticker and applies the saved parameters.
Note: To find the correct Contract Size, go to MT5, right-click on the asset, select "Specification," and look for the "Contract Size" value.
Exact Margin Management: Calculate exactly how many lots to enter in MT5 based on the specific USD amount you want the broker to set aside as collateral (Margin). This value is fully adjustable in the settings.
Smart Leverage Logic: Includes automated logic for standard 2026 industry leverage levels (1:50 Forex, 1:10 Energies/Metals, 1:15 Cash Indices, 1:2 Crypto), with a manual override option.
High-Contrast Visualization: A clean and professional table interface with adjustable positioning on the chart (Top Right/Left, Bottom Right/Left).
Real-Time Data: All calculations are performed using the live price and data source of the ticker currently displayed on your chart.
Instructions for Use:
[]In the "Inputs" tab, enter your frequent tickers (e.g., XTIUSD, NAT.GAS) and their contract sizes according to your broker's specifications.
[]Define the "Margin to Retain" (the amount in USD you wish to use as collateral for the trade).
[]The indicator will instantly display the MT5 LOT size to enter into your trading terminal.
[]Use the "Save as Default" option in the settings to ensure your 20 assets remain saved for future sessions.
hace 8 minutos
Notas de prensa
MT5 Smart Lot & Margin Calculator (Forex & CFDs)
General Description Trading across different asset classes often leads to confusion due to varying contract sizes and leverage requirements. This tool is a comprehensive solution for traders who use MetaTrader 5 (MT5) but perform their analysis on TradingView.
It calculates the exact Lot Size (Volume) you need to enter based on the specific Margin (Collateral) you want to commit to a trade. It is fully compatible with Forex pairs and CFDs (Gold, Oil, Gas, Indices, and Crypto).
🚀 Key Features
Forex & CFD Ready: Seamlessly switch between currencies and commodities.
Customizable Asset Database: Pre-configure up to 20 tickers with their specific Contract Sizes. The script detects the chart's ticker and applies settings automatically.
Precision Margin Management: Define exactly how many USD you want the broker to withhold as collateral.
2026 Standard Leverage Logic: Includes pre-set profiles for:
Forex (1:50)
Energies/Metals (1:10)
Cash Indices (1:15)
Crypto (1:2)
Manual Override included.
📊 Calculation Logic & Examples Formula: Lot Size = (Margin to Retain * Leverage) / (Current Price * Contract Size)
Example 1: Forex (EUR/USD)
Price: 1.0850
Contract Size: 100,000 (Standard Lot)
Leverage: 1:50
Margin to Retain: $500
Result: 0.23 Lots
Example 2: CFD Oil (WTI)
Price: $75.00
Contract Size: 1,000 (Standard Barrel Contract)
Leverage: 1:10
Margin to Retain: $300
Result: 0.04 Lots
🛠️ Instructions for Use
Setup Database: In the "Inputs" tab, enter your frequent tickers and their Contract Size (Find this in MT5: Right-click Asset > Specification > Contract Size).
Define Margin: Enter the "Margin to Retain" (USD amount to use as collateral).
Execute: The indicator displays the MT5 LOT size to type into your terminal.
Save Defaults: Use "Save as Default" in settings to keep your 20 assets stored.
Phát hành các Ghi chú
MT5 Lot & Margin Calculator for CFDs (Multi-Asset)General Description
This tool is designed for CFD traders using platforms like MetaTrader 5 who need a fast and accurate way to calculate lot size (volume) before entering the market. The calculator solves the issue of varying contract sizes across different assets (Oil, Natural Gas, Gold, Forex, etc.) and precisely calculates the margin withheld by the broker.
Key Features:
Customizable Database: Pre-configure up to 20 different assets with their respective Contract Sizes. Once set, the script automatically detects the chart's ticker and applies the saved parameters.
Note: To find the correct Contract Size, go to MT5, right-click on the asset, select "Specification," and look for the "Contract Size" value.
Exact Margin Management: Calculate exactly how many lots to enter in MT5 based on the specific USD amount you want the broker to set aside as collateral (Margin). This value is fully adjustable in the settings.
Smart Leverage Logic: Includes automated logic for standard 2026 industry leverage levels (1:50 Forex, 1:10 Energies/Metals, 1:15 Cash Indices, 1:2 Crypto), with a manual override option.
High-Contrast Visualization: A clean and professional table interface with adjustable positioning on the chart (Top Right/Left, Bottom Right/Left).
Real-Time Data: All calculations are performed using the live price and data source of the ticker currently displayed on your chart.
Instructions for Use:
[]In the "Inputs" tab, enter your frequent tickers (e.g., XTIUSD, NAT.GAS) and their contract sizes according to your broker's specifications.
[]Define the "Margin to Retain" (the amount in USD you wish to use as collateral for the trade).
[]The indicator will instantly display the MT5 LOT size to enter into your trading terminal.
[]Use the "Save as Default" option in the settings to ensure your 20 assets remain saved for future sessions.
hace 8 minutos
Notas de prensa
MT5 Smart Lot & Margin Calculator (Forex & CFDs)
General Description Trading across different asset classes often leads to confusion due to varying contract sizes and leverage requirements. This tool is a comprehensive solution for traders who use MetaTrader 5 (MT5) but perform their analysis on TradingView.
It calculates the exact Lot Size (Volume) you need to enter based on the specific Margin (Collateral) you want to commit to a trade. It is fully compatible with Forex pairs and CFDs (Gold, Oil, Gas, Indices, and Crypto).
🚀 Key Features
Forex & CFD Ready: Seamlessly switch between currencies and commodities.
Customizable Asset Database: Pre-configure up to 20 tickers with their specific Contract Sizes. The script detects the chart's ticker and applies settings automatically.
Precision Margin Management: Define exactly how many USD you want the broker to withhold as collateral.
2026 Standard Leverage Logic: Includes pre-set profiles for:
Forex (1:50)
Energies/Metals (1:10)
Cash Indices (1:15)
Crypto (1:2)
Manual Override included.
📊 Calculation Logic & Examples Formula: Lot Size = (Margin to Retain * Leverage) / (Current Price * Contract Size)
Example 1: Forex (EUR/USD)
Price: 1.0850
Contract Size: 100,000 (Standard Lot)
Leverage: 1:50
Margin to Retain: $500
Result: 0.23 Lots
Example 2: CFD Oil (WTI)
Price: $75.00
Contract Size: 1,000 (Standard Barrel Contract)
Leverage: 1:10
Margin to Retain: $300
Result: 0.04 Lots
🛠️ Instructions for Use
Setup Database: In the "Inputs" tab, enter your frequent tickers and their Contract Size (Find this in MT5: Right-click Asset > Specification > Contract Size).
Define Margin: Enter the "Margin to Retain" (USD amount to use as collateral).
Execute: The indicator displays the MT5 LOT size to type into your terminal.
Save Defaults: Use "Save as Default" in settings to keep your 20 assets stored.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.