Cromo: I see that I can use for next roop code to select all orders, but how can I add
OrderTicket() and OrderProfit() into 2-dimentioan array?\
Sort orders based on OrderOpenTime MQL4 programming forum
If I sort by OrderOpenTime , is it possible to pick up the most profit order and the most less profit order and 3nd profit order etc...?
Cromo: If I sort by OrderOpenTime , is it possible to pick up the
most profit order and the most less profit order and 3nd profit order etc...?
Sort by profit instead. When in doubt, THINK!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
HI, please give me some advice.
Below is the code sample to select the 2nd oldest opened order.
I want to do similar things.
I want to put ticket number and order profit in 2-dimentinal array.
For example,
[Ticket# , Profit]
#12, $12, #14, -$1, .......
I see that I can use for next roop code to select all orders, but how can I add OrderTicket() and OrderProfit() into 2-dimentioan array?
What I want is after putting these into Array, then I want to compaire the profit each other and select the order by ticket# and close it.
So it would be nice to put all into Array so that I can use easily.