2 E.A.'s running. Which one triggered the trade?

 

Hello.

I am a newbie. I was running 2 E.A.s at the same time. A trade was started automatically. How can I figure out which E.A. triggered the trade. Both E.A.s do the eur/usd.

Thanks.

 

there is an argument in orderSend function, the "comment", that u can set depending on the EA:

OrderSend (Symbol(), OP_BUY , 0.1, Ask, 3, Ask-50*Point, Ask +100*Point, "EA_1: uptrend"  , 11111, 0, Whyte);
OrderSend (Symbol(), OP_SELL, 0.1, Bid, 3, Bid+50*Point, Bid -100*Point, "EA_2: downtrend", 22222, 0, Whyte);

moreover, the next argument is called magicNumber, from which you can also descriminate, which EA opened the order.

 
abstract_mind wrote >>

there is an argument in orderSend function, the "comment", that u can set depending on the EA:

moreover, the next argument is called magicNumber, from which you can also descriminate, which EA opened the order.

Thank you abstract.

 
chingching wrote >>

Thank you abstract.

Is this comment written into the "journal" ?

 
order_comment appears in the TAB of open orders and in the TAB of closed orders. To the journal go event information (open/modify/close...), and I thin that all Print("sdsd") messages go to the Expert tab.
 

click RIGHT on your mouse (under "Trade" column) then click "Comments"

every ea's has their own comment...


regards,


MANSTIR

Reason: