Alert() function does not work in the Strategy Tester.
WHRoeder:
Perhaps you should read the manual. Alert - Common Functions - MQL4 Reference(just above the see also)
So how do I test my alert?
GumRai, I don't see the alert in journal tab.
GumRai, I don't see the alert in journal tab.
I don't see why. Sometimes not everything is reported in the journal tab and you have to open the actual log.
I wrote this simple test
static datetime bar_time=Time[0]; if(Time[0]!=bar_time) { bar_time=Time[0]; Alert("New Bar "+TimeToStr(Time[0])); }
and this was output to the journal.
0 07:53:25 2016.04.13 01:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 01:00
0 07:53:25 2016.04.13 02:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 02:00
0 07:53:25 2016.04.13 03:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 03:00
0 07:53:25 2016.04.13 04:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 04:00
0 07:53:25 2016.04.13 05:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 05:00
0 07:53:25 2016.04.13 06:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 06:00
0 07:53:25 2016.04.13 07:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 07:00
0 07:53:25 2016.04.13 08:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 08:00
0 07:53:25 2016.04.13 09:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 09:00
0 07:53:25 2016.04.13 10:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 10:00
0 07:53:25 2016.04.13 11:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 11:00
0 07:53:25 2016.04.13 12:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 12:00
0 07:53:25 2016.04.13 13:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 13:00
0 07:53:25 2016.04.13 14:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 14:00
0 07:53:25 2016.04.13 15:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 15:00
0 07:53:25 2016.04.13 16:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 16:00
0 07:53:26 2016.04.13 17:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 17:00
0 07:53:26 2016.04.13 18:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 18:00
0 07:53:26 2016.04.13 19:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 19:00
0 07:53:26 2016.04.13 20:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 20:00
0 07:53:26 2016.04.13 21:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 21:00
0 07:53:26 2016.04.13 22:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 22:00
0 07:53:26 2016.04.13 23:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 23:00
0 07:53:26 2016.04.14 00:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 00:00
0 07:53:26 2016.04.14 01:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 01:00
0 07:53:26 2016.04.14 02:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 02:00
0 07:53:26 2016.04.14 03:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 03:00
0 07:53:26 2016.04.14 04:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 04:00
I don't see why. Sometimes not everything is reported in the journal tab and you have to open the actual log.
I wrote this simple test
and this was output to the journal.
0 07:53:25 2016.04.13 01:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 01:00
0 07:53:25 2016.04.13 02:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 02:00
0 07:53:25 2016.04.13 03:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 03:00
0 07:53:25 2016.04.13 04:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 04:00
0 07:53:25 2016.04.13 05:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 05:00
0 07:53:25 2016.04.13 06:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 06:00
0 07:53:25 2016.04.13 07:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 07:00
0 07:53:25 2016.04.13 08:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 08:00
0 07:53:25 2016.04.13 09:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 09:00
0 07:53:25 2016.04.13 10:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 10:00
0 07:53:25 2016.04.13 11:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 11:00
0 07:53:25 2016.04.13 12:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 12:00
0 07:53:25 2016.04.13 13:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 13:00
0 07:53:25 2016.04.13 14:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 14:00
0 07:53:25 2016.04.13 15:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 15:00
0 07:53:25 2016.04.13 16:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 16:00
0 07:53:26 2016.04.13 17:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 17:00
0 07:53:26 2016.04.13 18:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 18:00
0 07:53:26 2016.04.13 19:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 19:00
0 07:53:26 2016.04.13 20:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 20:00
k0 07:53:26 2016.04.13 21:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 21:00
0 07:53:26 2016.04.13 22:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 22:00
0 07:53:26 2016.04.13 23:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.13 23:00
0 07:53:26 2016.04.14 00:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 00:00
0 07:53:26 2016.04.14 01:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 01:00
0 07:53:26 2016.04.14 02:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 02:00
0 07:53:26 2016.04.14 03:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 03:00
0 07:53:26 2016.04.14 04:00 @@@@TEST AUDUSD,H1: Alert: New Bar 2016.04.14 04:00
Thank you for all your help and time.. it is much appreciated.. Please tell me where do I find the "actual Journal" as you call it that is independent of the Journal Tab?
with kind regards.. Neal
Neal_Van: Please tell me where do I find the "actual Journal" as you call it that is independent of the Journal Tab?
| Right click on a line. |
- 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 indicator fires alerts perfectly in realtime but while using the strategy tester it does no give me one alert.
Originally it is based off of Bid or Ask prices but I realized that wouldn't work in the Strategy Tester because obviously the market it closed.
I changed Bid to Low[0] and Ask to High[0] but this did not fix the problem.. Why wouldn't low and high work as price as a less than or greater than?
Thanks in advance for any help...
Respectfully, Neal