Control when I'm asked for manual confirmation of a trade.

 
Is there any way that I could arrange to be asked for manual confirmation when my EA wants to enter trades but not when it wants to close them?
 
Have the EA put up a message box and wait for user.
 
Thanks. I note that the constants for the flags and the return values of the MessageBox function don't seem to be defined within metatrader but it was a simple enough matter to find out their values and define them myself.
 
I'm getting orders failing due to invalid prices after using this. The price I use is just Bid or Ask as appropriate. My guess is that this happens because the EA gets the Bid and Ask at the start of the Start() procedure rather than each time I refer to them. So hopefully using RefreshRates() should solve it. I shall see.
 
Arbu:
So hopefully using RefreshRates() should solve it. I shall see.
If you don't use Predefined variables then you never need to refresh them . . . you can use MarketInfo instead.
 
RaptorUK:
If you don't use Predefined variables then you never need to refresh them . . . you can use MarketInfo instead.
Thanks, I see.
 
refresh rate after sleep or message box or obfuscate the code with market info
Reason: