Ok here is the code
void OnInit() { if(IsDemo()==false && IsConnected()==true)Alert("You are on real account"); return; }
That just shows previous alerts.
How would you like it if you get multiple alerts while you are away from the computer and only the last one shows?
That just shows previous alerts.
How would you like it if you get multiple alerts while you are away from the computer and only the last one shows?
Ok here is the code
Your "image" shows multiple alerts all at the same time (to the second). So assuming that it is indeed triggered in the OnInit() and not in the OnTick()/OnCalculate() then you must have the indicator/EA open on multiple charts, and you have just opened MetaTrader application.
In other words, when you closed MetaTrader you had multiple charts with that indicator/EA on them which got all saved to MetaTrader's profile cache. Thus, when you opened MetaTrader and all those charts opened up at the same time, you got multiple alerts for all of them at exactly the same time.
Does that coincide with the behavior you describe?
Your "image" shows multiple alerts all at the same time (to the second). So assuming that it is indeed triggered in the OnInit() and not in the OnTick()/OnCalculate() then you must have the indicator/EA open on multiple charts, and you have just opened MetaTrader application.
In other words, when you closed MetaTrader you had multiple charts with that indicator/EA on them which got all saved to MetaTrader's profile cache. Thus, when you opened MetaTrader and all those charts opened up at the same time, you got multiple alerts for all of them at exactly the same time.
Does that coincide with the behavior you describe?
I think you are making some sense @FMIC. However, I will take a look of the program with respect to your suggestion and get back to you. Thank you in advance.
I think you are making some sense @FMIC. However, I will take a look of the program with respect to your suggestion and get back to you. Thank you in advance.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
My alert() function accumulates messages each time it triggers. I want it to output the messages only once and not to accumulate it in several lines. Somebody may help please. See picture below for perusal.
The required message is the one above while the unwanted messages have been highlighted in red pen. Thank you in advance.