How to show MessageBox() in the Strategy Tester?

 

Hello,

while testing my EA in the strategy tester, there are no Alert() (OK, they are found in the journal) or MessageBox() pop-ups. Also PlaySound() is ignored.

In the MT4 "strategy tester" all these features were included. How is this with the MT5 strategy tester. Is there a way to pop up a MessageBox (including the freezing of the testing) or playing a sound?


Kindly,

Olle Onkel

 
olle.onkel:

Hello,

while testing my EA in the strategy tester, there are no Alert() (OK, they are found in the journal) or MessageBox() pop-ups. Also PlaySound() is ignored.

In the MT4 "strategy tester" all these features were included. How is this with the MT5 strategy tester. Is there a way to pop up a MessageBox (including the freezing of the testing) or playing a sound?

Hello olle.onkel,

please take a look at other Forum posts about the same subjects: it's well known that there are several limitations for using objects within the Strategy Tester. I fear this is also the case with message boxes... 

 
MessageBox() doesn't work with the Strategy Tester.
 
Thanks, that are not good news. Finally I found the restrictions of the tester. That even CAppDialog´s are not supported, ruins my plans for testing the EA like I wanted.
 
olle.onkel:
Thanks, that are not good news. Finally I found the restrictions of the tester. That even CAppDialog´s are not supported, ruins my plans for testing the EA like I wanted.
Probably you could post your requirements, so others might suggest you appropriate means for them.
 

Hello,

finally, I found a way to do the testing like I wanted. I used the MessageBox from the user32.dll of windows which also has the advantage that the tester freezes on pop up. The CAppDialog which I wanted to use for interacting with the tester I replaced by a WinForm written in C#. The interaction with the tester is handled with text files, which are created. For instance, pressing the button buy on the form creates a txt-file named "buy.txt" including all the necessary parameters.  Within the EA the OnTick() function checks for new files, they are interprated, the contents is executed and the files are deleted at the end.

For me this works fine so far.


Thank you for your replies,

Olle Onkel

 
olle.onkel:

Hello,

finally, I found a way to do the testing like I wanted. I used the MessageBox from the user32.dll of windows which also has the advantage that the tester freezes on pop up. The CAppDialog which I wanted to use for interacting with the tester I replaced by a WinForm written in C#. The interaction with the tester is handled with text files, which are created. For instance, pressing the button buy on the form creates a txt-file named "buy.txt" including all the necessary parameters.  Within the EA the OnTick() function checks for new files, they are interprated, the contents is executed and the files are deleted at the end.

For me this works fine so far.


Thank you for your replies,

Olle Onkel

Why make it simple when you can complicate.
 
angevoyageur:
Why make it simple when you can complicate.

I take this as a compliment ;-)

But, honestly, is there a more simpler way to do it? I mean, it is a mess. Any ideas are welcome!


Kindly,

Olle Onkel

 
olle.onkel:

I take this as a compliment ;-)

But, honestly, is there a more simpler way to do it? I mean, it is a mess. Any ideas are welcome!


Kindly,

Olle Onkel

If you know the scenary of the testing beforehand (anyway you have some points in time when you show the dialog boxes, right?), why not to create a complete text file with date/time/order information and run the test on it smoothly, without interaction?
 
Hi im new on this forum and i have that problem. Before the updated to MT4. The Message boxes and alerts were working on strategy tester, now is not working. Is there a way, a code, something i can get that working so i can practice? Please
 
awakefrontiers:
Hi im new on this forum and i have that problem. Before the updated to MT4. The Message boxes and alerts were working on strategy tester, now is not working. Is there a way, a code, something i can get that working so i can practice? Please
No one here that can help me?