Multiply orders
kot_filemon:
Have you any ideas? I'd like to open few orders in the same time. Conditions x>0.
Case 1. Problem is sometime ea opens only one position, or two, or all (I don't know why).
Why don't you know why ? don't you want to know ? why aren't you testing the return value from the OrderSend() and reporting the error if it failed ?
Read and implement this: What are Function return values ? How do I use them ?
kot_filemon: Case 1. Problem is sometime ea opens only one position, or two, or all (I don't know why). But if open one position (in 95%) it is last Ticket.
if (OrdersTotal()==0 && x>0){ RefreshRates(); Ticket=OrderSend(........); Ticket=OrderSend(........);
- Find out why What are Function return values ? How do I use them ? - MQL4 forum
- What do you think that RefreshRates is doing? Nothing! you need that between EACH server calls
- OrdersTotal()==0 makes your EA incompatible with every other, including itself on other pairs and manual trading order accounting - MQL4 forum
Have you any ideas? I'd like to open few orders in the same time. Conditions x>0.
Case 1. Problem is sometime ea opens only one position, or two, or all (I don't know why). But if open one position (in 95%) it is last Ticket.
Case 2. Ea open all positions but in diffrent time (I saw if appeared tick each instrument).
Case 3. If I use solution from Case 2. and OrderSend() with another conditions y<0, ea start mix strategy. Example 2 position with conditions x>0 and next with conditions y<0