It's a little different. I need to calculate lot size based on available funds and initial margin. In OrderCalcMargin I already need to specify the size of the position to be opened. In MQL4, the initial margin value was obtained using MarketInfo(Symbol(), MODE_MARGINREQUIRED), and then I performed necessary calculations.
AsAn: That's a bit of a misnomer. I need to calculate the lot size based on available funds and initial margin. In OrderCalcMargin, I already need to specify the volume of the position to be opened. In MQL4, the initial margin value was obtained using MarketInfo(Symbol(), MODE_MARGINREQUIRED) and then I performed necessary calculations.
Calculate the margin for one lot, then divide the amount of free funds by the obtained value - this will be the number of lots in the first approximation. Then round up to the lower side taking into account the minimum volume change SYMBOL_VOLUME_STEP and you can load the account to the full extent.
The SymbolInfoDouble(_Symbol, SYMBOL_MARGIN_INITIAL) function returns 0 on all instruments, how and what can be fixed?
The SymbolInfoDouble(_Symbol, SYMBOL_MARGIN_INITIAL) function returns 0 on any instrument, how and what can be fixed?
This is not an error.
SYMBOL_MARGIN_INITIAL and SYMBOL_MARGIN_MAINTENANCE are used in futures specifications and are not used in forex instruments.
Use the OrderCalcMargin function to calculate the margin.
This is not an error.
SYMBOL_MARGIN_INITIAL and SYMBOL_MARGIN_MAINTENANCE are used in futures specifications and are not used in forex instruments.
To calculate the margin, use the OrderCalcMargin function.
That's a bit of a misnomer. I need to calculate the lot size based on available funds and initial margin. In OrderCalcMargin, I already need to specify the volume of the position to be opened. In MQL4, the initial margin value was obtained using MarketInfo(Symbol(), MODE_MARGINREQUIRED) and then I performed necessary calculations.
- Tester: The drawing of the test results graph has been optimised.
It would have been better if it had not been changed.Dear developers!
When can we expect visualisation of testing in the Tester?
At least tell me a month?
Dear developers!
When can we expect visualisation of testing in the Tester?
At least tell me a month?
Why does it return "0"? If you use for instead of while, it returns 1.
Another question
"number in the item list" what is this number?