Errors, bugs, questions - page 527

 
Swan:

View-Tools-Experts.

Division by zero is a critical error. The mql programs categorically refuse to do this)

if you don't understand it, you can do something like this:

I showed that division by zero occurs only in a particular case, this zero should not be, and it does not exist if you take the divisor and the divisible separately, this is what is unclear,

OK, thanks for that, I'll look into it myself. Perhaps there is some truth in your answer, thank you again.

 
Im_hungry:

Unfortunately, it takes time to get into it. And time is money.

The problem will not solve itself,

There is a concept of unselfish help, at mql4.com and under other circumstances I also help from time to time if I can. You could have just kept quiet.
 
Olegts:
There is such a thing as unselfish help, at mql4.com and under other circumstances, I also sometimes help if I can. You could have just kept quiet.
Mutual, my friend - mutual.
 
papaklass:

Is it supposed to be like this?

A position is closed, and the request PositionGetDouble(POSITION_PRICE_OPEN) returns the value of the closed position. Until a new position is opened, the value of the old (already closed) position is not changed. Is it supposed to be like this?

Let me get this straight. The PositionGetDouble(POSITION_PRICE_OPEN) query is done after the position availability query?
 

interesting point i.e.

to avoid this I use the following

double open = 0.0;
if (PositionSelect(Symbol_1))
 {
  open = PositionGetDouble(POSITION_PRICE_OPEN);
 }

and it will be zero as desired.

 
papaklass:

Request PositionsTotal() = 0. Now I make PositionGetDouble(POSITION_PRICE_OPEN) query and get in response the opening price of an already closed position. Ideally, I should get zero, since there is no position opened. Yes, after requesting about position's existence.

In my opinion, everything is within the rules:

The PositionSelect() function copies the position data into the software environment, and subsequent calls to PositionGetDouble(), PositionGetInteger() and PositionGetString() return the previously copied data. This means that the position itself may no longer exist (or it may have changed in volume, direction, etc.), but the data of this position can still be retrieved. In order to guarantee the receipt of fresh position data, it is recommended to call the PositionSelect() function immediately before calling for them.

However, I don't understand why the position data must be requested if the position selection fails. But never mind.

 

Dear developers. Don't take it as an imposition, I have a question: how do you feel about the possibility of cancelling a pending order if the price has reached a value?

Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
Документация по MQL5: Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров
  • www.mql5.com
Стандартные константы, перечисления и структуры / Торговые константы / Свойства ордеров - Документация по MQL5
 
Diubakin:

After upgrading to Build 507, I'm having two problems in the tester:

1. During optimisation when switching tester tabs, the terminal occasionally (not always) crashes;

2. If an enumeration was selected as an optimized parameter, then when trying to run one of the optimization results, the Expert Advisor does not see the value of this enumeration, i.e. it always equals to zero.

It seems to have found a problem with enumerations during optimization and the terminal crashes. You will need to wait for the next build.
 
stringo:
Seems to have found a problem with enumeration during optimisation and the terminal dropping out. You will have to wait for the next build.

Great. Can't reproduce the problem with remote agents hanging up?
I've already got tired of them. Rarely does an optimization go through without freezing.
I have to turn off the frozen agents, then turn them on and so on until the next freeze.
And it hangs on both agents that are on local network and cloud agents (less often).

 
crOss:

That's great. Can't you reproduce the problem with the remote agents hanging up?
I'm getting sick and tired of them. Rarely does an optimisation go through without freezing.
I have to turn off the hung agents, then turn them on and so on until the next hangs.
And it hangs on both agents that are on local network and cloud agents (less often).

A lot of things have been fixed in agents. And you don't have to wait for the next build. You have to wait for remote agents to upgrade to the currently released build