Errors, bugs, questions - page 18

 

In MQL4 there was such a function

double AccountFreeMarginCheck( string symbol, int cmd, double volume) 
Возвращает размер свободных средств, которые останутся после открытия указанной позиции по текущей цене на текущем счете. 
Если свободных средств не хватает, то будет сгенерирована ошибка 134 (ERR_NOT_ENOUGH_MONEY).  
In MQL5 I haven't found an analogue, will such a function be available or should I calculate it myself? If so, please advise how to do it properly.
 

When I switched to a new day, all the quotes for the 29th have disappeared. restarting the terminal does not help. refreshing the chart too.

 
Prival:

When I switched to a new day, all the quotes for the 29th have disappeared. restarting the terminal does not help. refreshing the chart too.

What server is the terminal connected to?
 
sergey1294:

In MQL4 there was a function like this

In MQL5 I haven't found an analogue, will such function be available or should I calculate it myself? If so, please advise how to do it properly.
See p. 16 of this topic. https://www.mql5.com/ru/forum/1111/page16/#comment_8755 A popular question, though! :)
 
Yedelkin:
See page 16 of this thread. 16 of this thread. https://www.mql5.com/ru/forum/1111/page16/#comment_8755 Popular question, though! :)
There is no required information there, there is only function ACCOUNT_FREEMARGIN to return free funds , and I need exactly how much free funds are left after opening position with volume for example 0.1 lot
 
alexvd:
What server is the terminal connected to?
I don't know. I only downloaded the terminal from you. I didn't use any other. Now the data has appeared, but it was absent this morning too (it was absent all night). I can send you the files for analysis, just tell me what and where
 
sergey1294:
there isn't necessary information there, there is only function ACCOUNT_FREEMARGIN, and I need namely the number of free funds left after the opening of a position by volume for example 0.1 lot

What is the difference between"ACCOUNT_FREEMARGIN" and"the number of free funds remaining after opening a position of e.g. 0.1 lot"?

Especially in both cases we are talking about "free funds". "Free funds for what exactly?

 
Yedelkin:

What is the difference between"ACCOUNT_FREEMARGIN" and"the number of free funds remaining after opening a position of e.g. 0.1 lot"?

Especially in both cases we are talking about "free funds". "Free funds for what exactly?


ACCOUNT_FREEMARGIN

Accountvalue in the currency of the deposit, which is available for the opening of a position.

double


ACCOUNT_FREEMARGIN, as far as I understand it, returns the current state of available funds.

In some cases it is also necessary to determine the amount of "free funds", taking into account the position which is not yet open, but which may be opened.

 
Interesting:


ACCOUNT_FREEMARGIN

Account balance available for opening a position in the currency of the deposit

double


ACCOUNT_FREEMARGIN, as far as I understand it, returns the current state of available funds.

In some cases we need to determine the amount of "free funds" in view of a position that is not yet open but can be opened.

That's right ACCOUNT_FREEMARGIN returns the current state of free funds but I need to get the value of remaining free funds before opening a position.
doubleFreeMarginCheck( string symbol, int cmd, double volume)
 

I think I understand the feature in question: determine the amount of free funds that will remain if a position is opened. Take a look at the following sections of the MQL5 manual:

- CAccountInfo;

- FreeMarginCheck.

Reason: