Trouble with OnChartEvent

 

Hi MQL4 community,

I'm trying to at least get this code to work and I can build from there. I was able to successfully load up a button, however, when I click on it, my code is not sending a message to inform me that the action has happened. I'm doing this in strategy testing mode and wish to complete this project as a simulator.

The .mql4 file is attached below.  No worry, not a lot of code in the file, which should make it easy to read.

Thanks

Files:
 
BernWillChris:I'm trying to at least get this code to work and I can build from there. I was able to successfully load up a button, however, when I click on it, my code is not sending a message to inform me that the action has happened. I'm doing this in strategy testing mode and wish to complete this project as a simulator.

OnChartEvent() does not work in the Strategy Tester. This is stated in the documentation and has been stated many times on the forum as well.

Timer and ChartEvent events are not handled in the Strategy Tester.
 
FMIC:

OnChartEvent() does not work in the Strategy Tester. This is stated in the documentation and has been stated many times on the forum as well.

Timer and ChartEvent events are not handled in the Strategy Tester.

Okay,

I expected that. I checked both

https://www.mql5.com/en/docs/standardlibrary/expertclasses/expertbaseclasses/cexpert/cexpertonchartevent

and

https://docs.mql4.com/eventfunctions/eventchartcustom

and didn't see anything in the note section. What I did incorrectly on my part, was not searching the forum good enough before posting this concern. I work on that next time. So, I know that it is possible to create a simulator since there are some out there. However, not sure how they were able to do it since I can't work with events in the strategy tester. I'll look a little bit more into the documentations to see what I can find. 

 
FMIC:

OnChartEvent() does not work in the Strategy Tester. This is stated in the documentation and has been stated many times on the forum as well.

Timer and ChartEvent events are not handled in the Strategy Tester.
So it looks like you solved this problem earlier this year. Thanks and I will implement that technique.
Reason: