How to detect a trade made by the user?

 

Hello,


MQL4 does not seem to have an inbuilt function where a trade made by the user is detected. I am not even sure how I would go around defining it? Has anyone got an idea how to approach this problem? 


Thank you,

 
Rahul Shaji Parmeshwar:

Hello,


MQL4 does not seem to have an inbuilt function where a trade made by the user is detected. I am not even sure how I would go around defining it? Has anyone got an idea how to approach this problem? 


Thank you,

It is not infallible, but usually if the magic number is zero, then the trade was placed manually.

Of course it is possible that somebody may use an EA with the magic number set to zero.