Errors, bugs, questions - page 1432

 
Alexey Kozitsyn:

The OrderGetTicket() function will return the ticket of the order whose index is passed to it.

For the second question, OrderGetTicket() both returns the ticket and selects the order to work with it.

Thanks, Captain O. And how is the order of the indexes defined in the list of all orders?

OrderGetTicket returns the order ticket with the passed number in the list, not the number of the currently selected order I was asking about.

 
Ilya Malev:

Thanks, Captain O. And how is the order of the indexes in the list of all orders determined?

OrderGetTicket returns the order ticket with the passed number in the list, not the number of the currently selected order I was asking about.

As far as I remember the oldest (first) = 0 etc. Check it out, it's a 5 minute job.

This is the order you have selected. How has it been selected? By number or by ticket?

In short, there are two ways: by number and by ticket. So far in my practice, there have been no situations where this would not be enough.

 
Alexey Kozitsyn:

Check it, it'll only take five minutes.

Of course I can check it myself. I wouldn't write here if it would solve the problem. You need a confirmation from the developers, because the result of the check can be situational or arbitrarily change in the future.

>>Your order has been selected. How has it been selected? By number or by ticket?

It is an additional question in MT4, I didn't care how it was selected but I needed to know its ticket to do something with it outside the function which selected it. In MT5 it looks like it will have to be solved programmatically, as well as many other things.

Alexey Kozitsyn:

So far there were no situations in my practice where it was not enough.

There are a lot of such situations in my practice. It happens every time when you want to save on code size in terms of passed parameters when calling functions that deal with orders.
 

Not only that, by the way: imagine a situation where you are working with the order you have just selected, but you need to call a function to get information from other orders.

When this function is called, you will have to select the order anew, because this function modifies the current selection by getting some information from other orders.

It would be logical in all such functions to remember the current order selection before running them and re-select it before returning, so that the current order selection does not change when such functions are called, which may help avoid some hard-to-find logical errors in the code. But in MT5 this simply isn't possible as there is no analog of the OrderTicket function and we have to invent a program wrapper in the form of a special class for order selection and getting its ticket.

 
Ilya Malev:

Not only that, by the way: imagine a situation where you are working with the order you have just selected, but you need to call a function to get information from other orders.

When this function is called, you will have to select the order anew, because this function modifies the current selection by getting some information from other orders.

It would be logical in all such functions to remember the current order selection before running them and re-select it before returning, so that the current order selection does not change when such functions are called, which may help avoid some hard-to-find logical errors in the code. But in MT5 this simply isn't possible as there is no analog of the OrderTicket function and we have to invent a program wrapper in the form of a special class for order selection and getting its ticket.

I do not see a problem. We have selected the order. We have remembered its ticket. We need another order - we found another order. We process it. We need to return to the previous order, we use OrderSelect(). That's all.
 
Alexey Kozitsyn:
I don't see the problem. Picked an order. Remembered his ticket. Need another order - found another order. We process it. We need to return to the previous order, we use OrderSelect(). That's all.
If the problem is something that can't be bypassed and done in another way, then there is no problem. But there is no analog of the OrderTicket function from MQL4 that is useful, either.
 
Ilya Malev:
If the problem is something that cannot be bypassed and done another way, then there is no problem. But there is no analogue of the useful OrderTicket function from MQL4 either.
If you really need it, you know where to ask. However, you are unlikely to be happy there.
 
MT4, build 910. No backward compatibility with previous build. I give a compiled indicator file to a person in the 910th build and he cannot launch it in the 902nd build with an error:

has newer unsupported version, please update your client terminal


Is this how it will be now?

 
Artyom Trishkin:
MT4, build 910. No backward compatibility with previous build. I give a compiled indicator file to a person in the 910th build and he cannot launch it in the 902nd build with an error:

has newer unsupported version, please update your client terminal


Is this how it will be now?

It was the same in MT5 when they introduced ticks.
 
Artyom Trishkin:
MT4, build 910. No backward compatibility with previous build. I give a compiled indicator file to a person in the 910th build and he cannot launch it in the 902nd build with an error:

has newer unsupported version, please update your client terminal


Is this how it will be now?

Yes, that's how it's supposed to work. There were changes in compiler in 910 build, respectively, ex4 generated by updated compiler can not run in previous versions of the terminal.