Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 419

 
Ekburg:


What should a brokerage company do? magicians are in the terminal, they are not displayed on the server and if a robot trades, the broker knows about it))))

Try to create a two-dimensional array, when you put a pending order write the ticket directly into it, in the second cell its serial number, then you can always know which is the oldest and delete it by ticket

Thanks, I will try it! But I have not dealt with arrays yet, I will figure it out!
 
borilunad:
Thank you! That's the thing, I don't want to go public with a magician!
Trade in auto-quoted accounts and you won't have a problem.
 

Happy holidays to all. Can you tell me how to set a parameter when searching for orders, so that the account is not based on order opening time, but on price. Well, for example, from the order with the highest price to the lowest, or vice versa, it does not matter, rather than from the first order placed to the last one. I don't know any other parameters except BY_POS and BY_TICKET .

for(int z=0; z<=OrdersTotal(); z++)

{

if (OrderSelect(z,SELECT_BY_POS, MODE_TRADES)==true)

 
Melko:

Happy holidays to all. Can you tell me how to set a parameter when searching for orders, so that the account is not based on order opening time, but on price. Well, for example, from the order with the highest price to the lowest, or vice versa, it does not matter, rather than from the first order placed to the last one. I don't know any other parameters except BY_POS and BY_TICKET .

for(int z=0; z<=OrdersTotal(); z++)

{

if (OrderSelect(z,SELECT_BY_POS, MODE_TRADES)==true)

In the first loop, you enter orders into a two-dimensional array, all the required parameters, and in the second loop, sorting itself. The sorting method is up to you, you can take it from the numerical methods textbook. Is it worth it?
 
Melko:

Happy holidays to all. Can you tell me how to set a parameter when searching for orders, so that the account is not based on order opening time, but on price. Well, for example, from the order with the highest price to the lowest one or vice versa does not matter but from the first order placed to the last one. I do not know any parameters other than BY_POS and BY_TICKET.

for(int z=0; z<=OrdersTotal(); z++)

{

if (OrderSelect(z,SELECT_BY_POS, MODE_TRADES)==true)


There is no such parameter in OrderSelect().

How is it "from the order with the highest price"?

What you want I've seen somewhere, in some Expert Advisor, maybe the function by Kim was even there (search there).

In a two-dimensional array, all tickets and their properties were filled in, and then in the loop, the loop was searched (if the condition was fulfilled with the help of an intermediate array, the data of the two-dimensional array were "swapped").

 
evillive:
In the first loop, you enter orders into a two-dimensional array, all the required parameters, and in the second loop, sorting itself. The sorting method is up to you, you can take it from the numerical methods textbook. Is it worth it?
Yes, exactly. What are these required parameters? For example, I need to select the nearest or farthest from the market (by price) pending order.
 
ALXIMIKS:


There is no such parameter in OrderSelect().

"from the order with the highest price" - how?

What you want I have seen somewhere, in some Expert Advisor, maybe Kim's function even existed (search there).

All tickets and their properties were loaded into a two-dimensional array, and then in the loop was enumerated (if the condition was fulfilled with the help of an intermediate array, the data of the two-dimensional array was "swapped").

"Theorder with the highest price- what is it? "The Buy Stop which is higher than all others from the market price has the highest price. The Buy Stop which is below... - has the lowest price. It is the same with the Sell Stop. The usual positioning on the chart.
 
Melko:
Yes, specifically. What are these required parameters? I, for example, need to select the nearest or furthest from the market (in terms of price) pending order.
Compare the opening price with the current price - Delta (difference) will be the attribute by which orders can be sorted.
 
khorosh:
Trade in auto-quoted accounts and you won't have any problems.
What are they called? To look for? I have an EUN, what is it called, and have been convinced several times that not everything is ok. :(
 
borilunad:
What are they called? To look for? I have an EUN what's the name and have been convinced several times that not everything is in order. :(
Look where the commission is, they don't usually cheat there.
Reason: