Download MetaTrader 5
To add comments, please log in or register
Manage agents in your profile. It is easy!
Chris
78
Chris 2016.07.02 16: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

Files:
Fernando Carreiro
1483
Fernando Carreiro 2016.07.02 18: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.
Chris
78
Chris 2016.07.02 21: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. 

Chris
78
Chris 2016.07.02 21: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.
Chris
78
Chris 2016.07.02 21:23  
/
To add comments, please log in or register