How to Control SendNotification()
You can use the example in this article
https://www.mql5.com/en/articles/159
Then you can use the for loop or write two SendNotification() functions
- www.mql5.com
- Why do you want only 2 times? Don't you want a message every signal?
- Don't look at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - Strategy Tester - Expert Advisors and Automated Trading - MQL5 programming forum #1 - Or wait for a new bar and then act.
For a new bar test, Bars is unreliable (a refresh/reconnect can change number of bars on chart,) volume is unreliable (miss ticks,) Price is unreliable (duplicate prices and The == operand. - MQL4 programming forum.) Always use time.
I disagree with making a new bar function, because it can only be called once per tick. A variable can be tested multiple times.
New candle - MQL4 programming forum
- Why do you want only 2 times? Don't you want a message every signal?
- Don't look at a signal. Act on a change of signal.
MQL4 (in Strategy Tester) - double testing of entry conditions - Strategy Tester - Expert Advisors and Automated Trading - MQL5 programming forum #1 - Or wait for a new bar and then act.
Dear William,
I want notification only for 2 times so that it won't be disturbing factor. and I want 2 time to make sure I get notified in case if I missed first one. waiting for new bar is not practical for my conditional need.
I am wondering if there would be any coding solution in this requirement!!!
Dear Experts,
Can you help me with a code to Control SendNotification() to send Notification only 2 time.
Many Thanks in Advance