Errors, bugs, questions - page 143

 
pronych:

First we check how much OrderCalcMargin(...) is needed, and then we compare it with what AccountInfoDouble( ACCOUNT_FREEMARGIN ) has. As far as I understand it.

And the market environment, is the instrument properties such as ask, bid, volume... and in this case the required collateral. Correct me if I'm wrong.

bool  OrderCalcMargin(
   ENUM_ORDER_TYPE       action,           // тип ордера
   string                symbol,           // имя символа
   double                volume,           // объем
   double                price,            // цена открытия
   double&               margin            // переменная для получения значения маржи
   );

Well, there is a price in the function parameters, i.e., when opening an order by market, we specify asc or bid. Therefore, the market environment is something else.

And, actually, what is interesting is not even what this mysterious "market environment" is that doesn't include open positions and pending orders (and this should be the market environment...) .

But if a pending order is placed at the Championship. At the moment when it was set, according to this function, we check everything fine. But the price goes against the position and reaches the pending order, but there is not enough money to open it, the server sends us a message... (it deletes the pending order) and, consequently, we get the "not enough money" error. Will it be considered as an error?

 
Dmitriy2:

Well there is a price in the function parameters, i.e. when opening an order on the market, we specify asc or bid. Accordingly, the market environment is something else...

And, actually, what is interesting is not even what this mysterious "market environment" is that doesn't include open positions and pending orders(and this should be the market environment...) .

But if a pending order is placed at the Championship. At the moment when it was set, according to this function, we check everything fine. But the price goes against the position and reaches the pending order, but there is not enough money to open it, the server sends us a message... (it deletes the pending order) and, consequently, we get the "not enough money" error. Will this be considered as an error?

The market environment is everything, pardon the tautology, that is around, excuse me, your working tool. In this case.

The second question is a mystery. I will not answer it. I understand time is short, but try to simulate on your demo account on m1 with stops close. or wait for comments.

Sorry, I can't help you here, I don't work with pending orders in code.

 

However, you can check it in the tester. Yes, as the saying goes, "fear not, but make do".

Good luck with that.

 

What's there to simulate, the test sometimes produces an error that there is no money in this particular situation. Let's say it is possible to co-optimize so that such a situation doesn't occur... but why would it be necessary... You may be disqualified from the championship. And calculating every time what will happen to a score with several positions and several delays is unreasonable both from the point of view of resources and logically...

As for the environments, I don't understand what they mean and why they wrote it... I don't understand why they didn't write it for each function... For example on the structure of trade request you could write "works with the current market environment"...:) some secret meaning here...:)

Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса
Документация по MQL5: Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса
  • www.mql5.com
Стандартные константы, перечисления и структуры / Структуры данных / Структура торгового запроса - Документация по MQL5
 
2003.01.02 09:54:30 Network '680408': authorization on MetaQuotes-Demo failed (Invalid or fake server)


after registering a new demo account i can't login with this error. what does it mean and what can i do?

 
Dmitriy2:

What's there to simulate, in the test there is sometimes an error that there is no money in this particular situation. Suppose you could optimise it so that this situation doesn't occur... but why would it be necessary... You may think it will be a reason for disqualification from the Championship. And it is not reasonable from the point of view of resources and logical to calculate every time what will happen to the account with several positions and several postponements...

As for the environments, I don't understand what they mean and why they wrote it... I don't understand why they didn't write it for each function... For example, you could write "works with current market environment" on trade request structure...:) some kind of secret meaning...:)

It's always been difficult to manage with pauses. in mt4 too. maybe you should try to get rid of it, for example make virtual pauses (just store them in variables and open them when the price has crossed the market). Time is important now.

And the environment, as I've already formulated it in my brain, is approximately this - "parameters that are changed or not changed depending on the market situation, applicable to a specific symbol or their group". Does this make more sense? You could write simply from the market

 
nickbilak:
2003.01.02 09:54:30 Network '680408': authorization on MetaQuotes-Demo failed (Invalid or fake server)


after registering a new demo account i can't login with this error. what does it mean and what can i do?


check the time on your computer.
 
Lizar:
check the time on your computer

Thanks, it worked :)

it was on my laptop the bios reset recently and i didn't notice the time

they could have printed it in the log instead of Invalid or fake server

 
Dmitriy2:

But if, on the other hand, a postponement is set in the championship. At the moment when it was set, according to this function, we check everything is normal. But the price goes against the position, reaches the pending order, but there is not enough money for the opening, the server sends...(deletes the pending order), respectively, an error "not enough money" occurs. Will this be considered an error?
Such single errors will not affect the fate of your EA in the Championship. But, if there is no money, it will make a stupid retry to open a position generating Gbytes in the log, as it happened in the previous Championships, then it will be disqualified.
 
nickbilak:

they could have printed this in the log instead of Invalid or fake server

It was the time in the log that I was paying attention to. The name of the error is hilarious.