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
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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?