Errors, bugs, questions - page 91

 
AsAn:
The SymbolInfoDouble(_Symbol, SYMBOL_MARGIN_INITIAL) function returns 0 on all instruments, how and what can be fixed?

What are we trying to get?
 
Trying to get the amount of initial margin to open a position.
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация об инструменте - Документация по MQL5
 
AsAn:
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.

 
Renat:

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.

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.
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
Документация по MQL5: Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете
  • www.mql5.com
Стандартные константы, перечисления и структуры / Состояние окружения / Информация о счете - Документация по MQL5
 
When will the changes to the 305 build be published?
 
  1. 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?

 
jmiller:

Dear developers!

When can we expect visualisation of testing in the Tester?

At least tell me a month?


Definitely after the Championship, though it may be two weeks before it... :)
 
int test()
{
while(true)
{
return 1;
break;
}

return 0;
}

Why does it return "0"? If you use for instead of while, it returns 1.

Another question

string  PositionGetSymbol(
   int  index      // номер в списке позиций
   );
"number in the item list" what is this number?
Reason: