Multi graph expert advisor

 

Hello guy,

I've go the following problem to solve. Some help will be appreciated.

I started EA-1 on one graph. For example have no executed order yet.

But on other graph I got other running EA-2, which decide to order for example EURUSD, with magic number 5555.

If the EA-1 watch for order with magic number 5555, is it possible to detect the order and interfere ?

In other words, is it possible one EA to start some order, but other to close it ? If possible, how exactly ?


Thanks in advance :)

 
neverman:

Hello guy,

I've go the following problem to solve. Some help will be appreciated.

I started EA-1 on one graph. For example have no executed order yet.

But on other graph I got other running EA-2, which decide to order for example EURUSD, with magic number 5555.

If the EA-1 watch for order with magic number 5555, is it possible to detect the order and interfere ?

In other words, is it possible one EA to start some order, but other to close it ? If possible, how exactly ?


Thanks in advance :)

Yeah its possible. The second ea looks at all the orders on the account and checks the magic number. If it finds a magic number with 5555 then it can perform an order close on that. You would use a basic order select loop to perform the checking. If you need additional information then I'll recommend you learn how to code using the book.
 

You told me what I need, Magic number is universal order number which allow manipulating orders from different places (expert advisors).


Thanks for the fast and useful answer. :)

Reason: