Trouble with OnChartEvent

Back to topics list To post a new topic, please log in or register
avatar
21
BernWillChris 2016.07.02 18:29
 

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

 

Attached files:
  simulator_v1.0.mq4  (2.54 KB)
avatar
1215
FMIC 2016.07.02 20:16 #
 
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.
avatar
13000
avatar
21
BernWillChris 2016.07.02 23:08 #
 
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. 

 

avatar
21
BernWillChris 2016.07.02 23:22 #
 
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.
avatar
21
Back to topics list  

To add comments, please log in or register