I am trying to figure out how to stop alerts from popping up and emails being sent when i first open MT4.
I remember seeing some code that included a function OnLoading() that basically did this but i cannot recall where.
The alerts and emails work well in my indicators but it is annoying when i first open MT4 and it wants to fire off a whole bunch of emails or alerts.
I thought about using IsConnected() but while that will stop the alerts when i first fire up MT4 I assume that as soon as I connect that it will then send them. The other idea I had was to use UninitializeReason() in the init function and based on the reason to not fire alerts.
Any help would be appreciated.
I remember seeing some code that included a function OnLoading() that basically did this but i cannot recall where.
The alerts and emails work well in my indicators but it is annoying when i first open MT4 and it wants to fire off a whole bunch of emails or alerts.
I thought about using IsConnected() but while that will stop the alerts when i first fire up MT4 I assume that as soon as I connect that it will then send them. The other idea I had was to use UninitializeReason() in the init function and based on the reason to not fire alerts.
Any help would be appreciated.