Lot Size Calkulator
- Göstergeler
- Jonas Grybauskas
- Sürüm: 1.0
- Etkinleştirmeler: 5
Principle of Operation
1. Data Retrieval:
The indicator gathers real-time data on the trading instrument, including:
- Minimum and maximum lot sizes
- Tick value
- Spread
- Number of digits
- Account data (balance, currency)
2. Connection Check:
If there is no connection to the broker, a message is displayed on the chart, and no further calculations are performed.
3. Optimal Lot Size Calculation:
- Risk Determination: The indicator considers the specified risk value (e.g., 2% of the account balance) and the stop-loss value.
- Calculation of Risk Amount: It computes the amount of money the trader is willing to risk.
- Lot Size Determination: The risk amount is divided by the product of the stop-loss and the tick value. The result is adjusted to the nearest allowed step and constrained within the minimum and maximum lot sizes.
4. Displaying Information on the Chart:
- If enabled, the spread value is displayed.
- For each specified stop-loss, the calculated lot size is shown.
- Additional risk information may be displayed in percentage terms and the account's currency.
Input Parameters of the Product
1. Maximum Risk (MaxRisk):
- The percentage of the account balance that the trader is willing to risk (e.g., 2%).
2. Stop-Loss (Stop_Loss):
- A string containing one or more stop-loss values separated by spaces (e.g., "07 10 15 20 25 30").
3. Chart Positioning:
- Corner: The corner of the chart where the information will be displayed (values from 0 to 3).
- Coord_Y: The starting Y-coordinate (in pixels).
- Coord_X: The starting X-coordinate (in pixels).
- RowSpacing: The vertical spacing between lines (in pixels).
4. Display Colors:
- MainColor: The primary text color.
- SpreadColor: The color used for displaying spread information.
- RiskColor: The color used for displaying risk information.
5. Display Options:
- ShowPercent: Whether to display the risk as a percentage.
- ShowCurrency: Whether to display the risk in the account's currency.
- ShowSpread: Whether to display the spread information.
6. Font Settings:
- FontSize: The size of the font for the displayed text.
- FontChoice: The font choice (e.g., Arial, Times New Roman, Courier New, Verdana, Tahoma).
7. Interface Language (Language):
- The language for displaying text (English, German, or French).
This indicator enables traders to determine lot sizes efficiently based on their risk management preferences and current market conditions. Additionally, it provides extensive customization options for visually displaying key trading information on the chart.