Wessam Nabil:
You want to get the difference between history1 and history2 and keep it in z_Array, so that for all recently closed orders you can start a new one. But when the timer is called the next time, you might run into the same code, and you obtain the same difference set again. You should update history1 immediately after building the difference in z_Array, like with hello
im trying to code an expert with multi orders for 1 pair
the idea is opening x amount of orders
and when one or more order closed at the same time, the EA will collect its ticket numbers and deal with each order separately.
i tried arrays and files, even both together
the problem
EA some times duplicate the orders, i dont know why
and some times it over the limit of number of orders
i wish someone help me with this because i really feel disappoint after one month of searching and trying many codes without any progress
here is the code and thanks in advance
ArrayCopy(History_Order_Ticket1, History_Order_Ticket2, 0, 0, WHOLE_ARRAY);
And it looks like you don't need History_Order_Ticket, that is History_Order_Ticket1 and 2 should be sufficient to do the task.
thanks for your help:)
yes you are right thats exactly my problem
your solution is working well but in just a few orders 20 may be
but if it become mare orders its start to repeat some tickets number
what if No_of_position is 1000 thats mean 1000 order at the same time
if 300 closed i need to respond to the 300 one by one however it take time more than expert execution time
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
here is the code and thanks in advance