Pending orders execution

 

Hi, i need a way to open a trade automatically once the pending order is executed.


For example, i opened a pending order (Buy Stop) on EURUSD @ 1.1280. once the price reach and order executed i want another order (Sell Stop) to be opened automatically.

Any ideas?

 

1) Create a structure with order ticket and order type.

2) Then create array of this structures.

3) Walk through the order list,

3a) if order ticket doesnt exists in the array of structures - add it

3b) if order ticket exists in the array of structures - check order type, if order type changed from pending to market - take your actions.

4b) once you take your actions - update order type in your array of structures

 

Bartlomiej Gorski:

1) Create a structure with order ticket and order type.

2) Then create array of this structures.

3) Walk through the order list,

3a) if order ticket doesnt exists in the array of structures - add it

3b) if order ticket exists in the array of structures - check order type, if order type changed from pending to market - take your actions.

4b) once you take your actions - update order type in your array of structures

Thank you for your reply, i don't understand what array of structures i will work on?
 
hevaystos: i don't understand what array of structures i will work on?

You are way over your head. Top of every page is the link Freelance