Alert when order opend by money manager

 
I have an account traded by a money manager for me and i monitor the trades on my own computer, my question is;

can i write an indicator or script that would trigger an alert when a position is opened by the money manager?

I don't have too much experience with MQL but i am willing to learn, to my understanding it appears that it could be done by OrdersTotal() and trigger an alert when it changes (preferably only when it goes >).

I tried searching for similar posts but didn't find any, if you know of one please direct me

Thanks
 

Create a new indicator, modify init and start sections as below for a bare bones indicator of change

init(){

int oldTotal = OrdersTotal();

}

start(){

if( oldTotal != OrdersTotal()) {

Alert("Trade Activity Occurred");

oldTotal = OrdersTotal();

}

return(0);

}

 
Thank you "phy",

I need a little more help, where do i enter the sendmail? and how do i create different alerts for < or > orders (orders opened - orders closed) ?

is it also possible to notify if there where changes done to the TP or SL on an open order?

Thanks
 

"I don't have too much experience with MQL but i am willing to learn"

Give it a try, come back when you get stuck.

Reason: