PROTECTED SOURCE SCRIPT
Aggiornato

Automated Lot Size Calculator

170
// © Laurent3372
The "Automated Lot Size Calculator" is a sophisticated tool for traders who want to calculate the ideal position size based on their capital, risk, and the asset pair they wish to trade. Here is a detailed description of its features:

1. Language Selector
You can select the interface language (French, English, Spanish, German, or Italian). This makes the tool accessible and understandable to an international audience.
2. User Settings for Risk Calculation
The risk percentage per trade is configurable. The entered percentage is divided by 100 to obtain a fraction (for example, 1% becomes 0.01).
3. Selection of Equity in USD or EUR
The user chooses whether their equity is in US dollars or euros. Based on this choice, the calculation is based on the appropriate value.
A field for entering equity is available for both currencies, with a default initial amount. 4. Stop Loss in Pips
The stop loss can be entered in decimal places (such as 2.8 pips), allowing for high precision in risk calculations.
5. Interface Color Customization
You can configure the text and background colors for headers, values, and other visual elements, allowing you to customize the display.
6. Display Table Position and Size
You can choose the table location (top right, top left, bottom right, bottom left) as well as the display size (extra small, small, normal, large, extra large).
7. Asset Pair Detection and Pip Value
The code automatically detects the financial instrument (currency, crypto, precious metal) and adjusts the pip value according to the asset's characteristics. For example:
For JPY pairs, the pip is 0.01.
For cryptocurrencies, the pip is adjusted to 0.01.
For precious metals such as gold and silver, specific adjustments are also made.
8. Retrieving real-time exchange rates
The script uses the request.security function to retrieve real-time exchange rates for currencies or cryptocurrencies.
The code automatically adapts according to the trading pair and retrieves the appropriate rate (e.g., EUR/GBP, BTC/USD).
9. Calculating the risk amount in USD or EUR
The risk is calculated based on the selected capital (USD or EUR).
If the capital is in euros, it is converted to USD to simplify lot calculations.
10. Calculating position sizes in standard lots
The formula for calculating position sizes varies depending on the asset:
EUR/GBP is calculated with a specific adjustment.
Precious metals and cryptocurrencies have their own adapted formulas.
Exotic currencies incorporate a special conversion factor, taking into account pairs with more than two decimal places. 11. Lot Type Definition
The lot type is automatically adjusted according to the asset: "Micro Lot", "Standard Lot", or "Exotic Lot".
12. Results Display with Dynamic Translation
The results (currency, equity, risk, lot type, and size) are displayed in real time and automatically translated into the selected language.
The left column contains the parameters, and the right column displays the corresponding values.
13. Dynamically Creating the Results Table
The table is dynamically created using the specified position and size options. It contains all essential information, such as currency, equity, risk, and position size in lots.
Conclusion:
This script allows traders to automatically calculate their ideal position size by taking into account the currency, desired risk, and asset-specific parameters (such as cryptocurrencies and metals). Thanks to its customization options and automatic translations, it is suitable for global use, regardless of user profile.


Note di rilascio
// © Laurent3372

The "Automated Lot Size Calculator" is a sophisticated tool for traders who want to calculate the ideal position size based on their capital, risk, and the asset pair they wish to trade. Here is a detailed description of its features:

1. Language Selector
You can select the interface language (French, English, Spanish, German, or Italian). This makes the tool accessible and understandable to an international audience.
2. User Settings for Risk Calculation
The risk percentage per trade is configurable. The entered percentage is divided by 100 to obtain a fraction (for example, 1% becomes 0.01).
3. Selection of Equity in USD or EUR
The user chooses whether their equity is in US dollars or euros. Based on this choice, the calculation is based on the appropriate value.
A field for entering equity is available for both currencies, with a default initial amount. 4. Stop Loss in Pips
The stop loss can be entered in decimal places (such as 2.8 pips), allowing for high precision in risk calculations.
5. Interface Color Customization
You can configure the text and background colors for headers, values, and other visual elements, allowing you to customize the display.
6. Display Table Position and Size
You can choose the table location (top right, top left, bottom right, bottom left) as well as the display size (extra small, small, normal, large, extra large).
7. Asset Pair Detection and Pip Value
The code automatically detects the financial instrument (currency, crypto, precious metal) and adjusts the pip value according to the asset's characteristics. For example:
For JPY pairs, the pip is 0.01.
For cryptocurrencies, the pip is adjusted to 0.01.
For precious metals such as gold and silver, specific adjustments are also made.
8. Retrieving real-time exchange rates
The script uses the request.security function to retrieve real-time exchange rates for currencies or cryptocurrencies.
The code automatically adapts according to the trading pair and retrieves the appropriate rate (e.g., EUR/GBP, BTC/USD).
9. Calculating the risk amount in USD or EUR
The risk is calculated based on the selected capital (USD or EUR).
If the capital is in euros, it is converted to USD to simplify lot calculations.
10. Calculating position sizes in standard lots
The formula for calculating position sizes varies depending on the asset:
EUR/GBP is calculated with a specific adjustment.
Precious metals and cryptocurrencies have their own adapted formulas.
Exotic currencies incorporate a special conversion factor, taking into account pairs with more than two decimal places. 11. Lot Type Definition
The lot type is automatically adjusted according to the asset: "Micro Lot", "Standard Lot", or "Exotic Lot".
12. Results Display with Dynamic Translation
The results (currency, equity, risk, lot type, and size) are displayed in real time and automatically translated into the selected language.
The left column contains the parameters, and the right column displays the corresponding values.
13. Dynamically Creating the Results Table
The table is dynamically created using the specified position and size options. It contains all essential information, such as currency, equity, risk, and position size in lots.
Conclusion:
This script allows traders to automatically calculate their ideal position size by taking into account the currency, desired risk, and asset-specific parameters (such as cryptocurrencies and metals). Thanks to its customization options and automatic translations, it is suitable for global use, regardless of user profile.


Note di rilascio
// © Laurent3372

The "Automated Lot Size Calculator" is a sophisticated tool for traders who want to calculate the ideal position size based on their capital, risk, and the asset pair they wish to trade. Here is a detailed description of its features:

1. Language Selector
You can select the interface language (French, English, Spanish, German, or Italian). This makes the tool accessible and understandable to an international audience.
2. User Settings for Risk Calculation
The risk percentage per trade is configurable. The entered percentage is divided by 100 to obtain a fraction (for example, 1% becomes 0.01).
3. Selection of Equity in USD or EUR
The user chooses whether their equity is in US dollars or euros. Based on this choice, the calculation is based on the appropriate value.
A field for entering equity is available for both currencies, with a default initial amount. 4. Stop Loss in Pips
The stop loss can be entered in decimal places (such as 2.8 pips), allowing for high precision in risk calculations.
5. Interface Color Customization
You can configure the text and background colors for headers, values, and other visual elements, allowing you to customize the display.
6. Display Table Position and Size
You can choose the table location (top right, top left, bottom right, bottom left) as well as the display size (extra small, small, normal, large, extra large).
7. Asset Pair Detection and Pip Value
The code automatically detects the financial instrument (currency, crypto, precious metal) and adjusts the pip value according to the asset's characteristics. For example:
For JPY pairs, the pip is 0.01.
For cryptocurrencies, the pip is adjusted to 0.01.
For precious metals such as gold and silver, specific adjustments are also made.
8. Retrieving real-time exchange rates
The script uses the request.security function to retrieve real-time exchange rates for currencies or cryptocurrencies.
The code automatically adapts according to the trading pair and retrieves the appropriate rate (e.g., EUR/GBP, BTC/USD).
9. Calculating the risk amount in USD or EUR
The risk is calculated based on the selected capital (USD or EUR).
If the capital is in euros, it is converted to USD to simplify lot calculations.
10. Calculating position sizes in standard lots
The formula for calculating position sizes varies depending on the asset:
EUR/GBP is calculated with a specific adjustment.
Precious metals and cryptocurrencies have their own adapted formulas.
Exotic currencies incorporate a special conversion factor, taking into account pairs with more than two decimal places. 11. Lot Type Definition
The lot type is automatically adjusted according to the asset: "Micro Lot", "Standard Lot", or "Exotic Lot".
12. Results Display with Dynamic Translation
The results (currency, equity, risk, lot type, and size) are displayed in real time and automatically translated into the selected language.
The left column contains the parameters, and the right column displays the corresponding values.
13. Dynamically Creating the Results Table
The table is dynamically created using the specified position and size options. It contains all essential information, such as currency, equity, risk, and position size in lots.
Conclusion:
This script allows traders to automatically calculate their ideal position size by taking into account the currency, desired risk, and asset-specific parameters (such as cryptocurrencies and metals). Thanks to its customization options and automatic translations, it is suitable for global use, regardless of user profile.






Note di rilascio
// © Laurent3372

The "Automated Lot Size Calculator" is a sophisticated tool for traders who want to calculate the ideal position size based on their capital, risk, and the asset pair they wish to trade. Here is a detailed description of its features:

1. Language Selector
You can select the interface language (French, English, Spanish, German, or Italian). This makes the tool accessible and understandable to an international audience.
2. User Settings for Risk Calculation
The risk percentage per trade is configurable. The entered percentage is divided by 100 to obtain a fraction (for example, 1% becomes 0.01).
3. Selection of Equity in USD or EUR
The user chooses whether their equity is in US dollars or euros. Based on this choice, the calculation is based on the appropriate value.
A field for entering equity is available for both currencies, with a default initial amount. 4. Stop Loss in Pips
The stop loss can be entered in decimal places (such as 2.8 pips), allowing for high precision in risk calculations.
5. Interface Color Customization
You can configure the text and background colors for headers, values, and other visual elements, allowing you to customize the display.
6. Display Table Position and Size
You can choose the table location (top right, top left, bottom right, bottom left) as well as the display size (extra small, small, normal, large, extra large).
7. Asset Pair Detection and Pip Value
The code automatically detects the financial instrument (currency, crypto, precious metal) and adjusts the pip value according to the asset's characteristics. For example:
For JPY pairs, the pip is 0.01.
For cryptocurrencies, the pip is adjusted to 0.01.
For precious metals such as gold and silver, specific adjustments are also made.
8. Retrieving real-time exchange rates
The script uses the request.security function to retrieve real-time exchange rates for currencies or cryptocurrencies.
The code automatically adapts according to the trading pair and retrieves the appropriate rate (e.g., EUR/GBP, BTC/USD).
9. Calculating the risk amount in USD or EUR
The risk is calculated based on the selected capital (USD or EUR).
If the capital is in euros, it is converted to USD to simplify lot calculations.
10. Calculating position sizes in standard lots
The formula for calculating position sizes varies depending on the asset:
EUR/GBP is calculated with a specific adjustment.
Precious metals and cryptocurrencies have their own adapted formulas.
Exotic currencies incorporate a special conversion factor, taking into account pairs with more than two decimal places. 11. Lot Type Definition
The lot type is automatically adjusted according to the asset: "Micro Lot", "Standard Lot", or "Exotic Lot".
12. Results Display with Dynamic Translation
The results (currency, equity, risk, lot type, and size) are displayed in real time and automatically translated into the selected language.
The left column contains the parameters, and the right column displays the corresponding values.
13. Dynamically Creating the Results Table
The table is dynamically created using the specified position and size options. It contains all essential information, such as currency, equity, risk, and position size in lots.
Conclusion:
This script allows traders to automatically calculate their ideal position size by taking into account the currency, desired risk, and asset-specific parameters (such as cryptocurrencies and metals). Thanks to its customization options and automatic translations, it is suitable for global use, regardless of user profile.


Note di rilascio
XAUUSD and XAGUSD Lot Update
Note di rilascio
XAUUSD and XAGUSD Lot Update

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.