Download MetaTrader 5

How to attach EA to an open position

To add comments, please log in or register
Stark
627
Stark 2015.06.26 08:37 
Dear Experts

I need advise on how to attach my EA to a manually opened position. 

Also if a chart on which an EA is attached is delete I lose the EA's tracking in the chart. Can this be reinstated? 

Any suggestions would be most appreciated. 


drum
5
drum 2015.06.26 10:05  
I would also be interested in this, or infact how I can monitor all open positions with an EA?
Alain Verleyen
Moderator
31091
Alain Verleyen 2015.06.26 12:37  
Stark:
Dear Experts

I need advise on how to attach my EA to a manually opened position. 


Your EA needs to be coded specially to do that. Usually an EA only take cares of its own trades.



Also if a chart on which an EA is attached is delete I lose the EA's tracking in the chart. Can this be reinstated?


That's an other matter. The EA needs to save its internal state, and be able to restore in case failure.

Osama Shaban
1464
Osama Shaban 2015.06.27 02:36  

There are some and possibilities to do that from my point of view ...

Like, do you want to manage a specific order on an account while other orders are opened manually to,

or, are the other orders are opened by other EA? ... are they of the same pair?

For every possibility, there is a specific solution, like you need to write a specific comment if other order is 

manually opened and make the EA manage only orders having the same comment, or if other EA is used

and no other manual orders are used, then, it is enough to make the EA manage orders with magic number

having value of zero, ...

I attach here an EA, it not my code, it manages any opened trade opened in the trading account regardless

of it's magic number ... It can be adjusted easily to mange only manual trades, or trade only trades of a

specific EA buy using it's magic number ... 

Stark
627
Stark 2015.06.27 23:44  

Guys thanks very much for your advise and for the free EA.

Osama I guest I need to think of how to deal with trades opened manually and how to get the EA to run it to closure. 

David Raine
140
David Raine 2015.06.29 03:35  
Stark:
Dear Experts

I need advise on how to attach my EA to a manually opened position. 

Also if a chart on which an EA is attached is delete I lose the EA's tracking in the chart. Can this be reinstated? 

Any suggestions would be most appreciated. 


Just remove any reference to the Magic Number in the procedure that closes your trades. Look at the free EA someone gave you above for how it is done.
To add comments, please log in or register