Open Metatrader and look for these key words
"ordersend(..... "
That is where the order is being place. So underneath that statement, place a
Code:
Print("You are out of Money", AccountFreeMargin());
Make sure you include the semi-colon, too. So this would print "you are out of money" and then it would print the variable AccountFreeMargin().
I believe you can add as many variables as you want by just adding a comma each time but I'm just speculating.
In your case, I guess you would put
Code:
Print("Order placed by system");
So each time it would print Order placed by system or whatever your system name is. I think it should work but I'm still unsure myself even.