Download MetaTrader 5
To add comments, please log in or register
Make screenshots in MetaTrader and manage them in the gallery!
Neal_Van
270
Neal_Van 2016.04.23 19:55 

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 

fxtrader_
247
fxtrader_ 2016.04.23 20:15  

Alert() function does not work in the Strategy Tester.

https://docs.mql4.com/common/alert

Keith Watford
Moderator
7887
Keith Watford 2016.04.23 21:57  
The Alert is printed in the journal tab
whroeder1
13600
whroeder1 2016.04.24 12:02  
Perhaps you should read the manual. Alert - Common Functions - MQL4 Reference
Alert() function does not work in the Strategy Tester.
(just above the see also)
Neal_Van
270
Neal_Van 2016.04.24 21:22  

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.  

Keith Watford
Moderator
7887
Keith Watford 2016.04.25 00:58  
Neal_Van:

 

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

Neal_Van
270
Neal_Van 2016.04.29 18:15  
GumRai:

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

whroeder1
13600
whroeder1 2016.04.29 19:32  
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.
/
To add comments, please log in or register