subbu:
Hi, I am new to this MQL4. I am trying to develop an expert advisor. I am trying to display an alert message when some conditions are met and when a new candle stick is started. But the alert message is displaying always. Is there any way an alert message is displayed whenever an new candle stick started. The alert message should display only one time and the next alert message when another new candlestick is started. Please help.
I think you could flag the time if conditions are met. Here's the algoritm. I havent tested it. I just hope that the way i did datetime comparison works fine.
//in global section datetime flagTime = NULL; ..... ..... if(<condition is met> && flagTime == NULL) { flagTime = Time[0]; //remember new candle open time //DO SOMETHING HERE } else if(flagTime != Time[0]) { flagTime = NULL; //reset flag }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi, I am new to this MQL4. I am trying to develop an expert advisor. I am trying to display an alert message when some conditions are met and when a new candle stick is started. But the alert message is displaying always. Is there any way an alert message is displayed whenever an new candle stick started. The alert message should display only one time and the next alert message when another new candlestick is started. Please help.