Pending orders query
-
Hi everyone,
Firstly thanks for your help. My problem is I have created an EA that uses the buy pending orders in grid function. The idea is to buy or sell 5 pending orders with given grid size and S/L & T/P. I have 2 problems listed below.
1.
The EA seems to work fine when just on a chart on its own; however, I have numerous EA's on different charts - All the EA's are the same, but with different magic numbers for each chart and are on a virtual private server.The problem is, when a pending order action becomes executable it may only action 1 or 2 pending orders in the incorrect order, instead of the 5 desired. I have also, classified each line into their own group numbers.
2
Lastly, one other problem I have with this is deleting the pending orders if the price moves too far away from the open price. This doesn't seem to be working for me at all.What I was aiming for was to have all pending orders deleted if the price moved too far away from the open price. For example, the buy pending orders are opened and if the price moved away from the open price (buy my usual S/L distance) the pending orders would be deleted.
It doesn't matter what I seem to do, I cant crack this one.
Below is an example of what I have created:
1

There are 14 different scenarios per EA, all with different group numbers. There are 33 different EA's, all with different magic numbers, and each on a different currency.
2

As the pending orders are placed 40 pips away from the open price, I want the pending orders to close if it moves a further 40 pips away - so 80 pips in total.
Any help with this would be greatly appreciated.
-
I should add, that sometimes the pending orders work, and sometimes they don't. I woke up this morning to find a jumbled mess. Deleted the errors, then some orders came through perfectly.
-
Also, the pending orders will not always delete on a winning trade.
Any thoughts?
-
If each EA works on a different Symbol, you can work with the same magic number, no problems.
So, the problem is that "Buy pending orders in grid" is set to create 5 pending orders, but it doesn't? In this case, do you see some error messages? For the deletion my question is the same - do you have error messages or it seems that some block doesn't work at all or it does something, but not all?
-
Hi,
Thanks for the response and sorry for my delayed answer. I was able to run one this morning and have the following information:



I even tried to change the order of each pending order to once each x amounts of ticks to try and create some space between the orders.
-
I have slippage set to 0, could that be the problem?
-
This is not the problem