EventSetTimer()

 
If I use the EventSetTimer() function in an EA will I be able to test it in the Strategy Tester? (I know e.g. that the Sleep() function does not work in the Tester)
 
Anybody knows what the latest situation is?
 

I've never had reason to use the timer function, so I don't know much about it.

I would have thought that it is quite simple to write an EA to Print something at time intervals and check it in the tester. 

 

Thanks for the feedback guys.

I have decided to rather code the time-events I want by making use of the TimeLocal() function.

Hope it will work for me. Just worried about the resources it is going to take.

 
TimeLocal doesn't work properly in the tester, it will return the same as TimeCurrent would, ie simulated broker time
 

Can anybody guide me in finding an acceptable solution for my need to read the price every so many seconds and put the price that is read in an array every time?

Hopefully a solution that can be tested in the Strategy Tester.

 
ernest02: Can anybody guide me in finding an acceptable solution for my need to read the price every so many seconds and put the price that is read in an array every time?
This isn't your first post. You should be able to code that simple thing. learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
 

WHRoeder I did not want anybody to code the EA for me - just to guide me to which functions should preferably be used.

The EventSetTimer(), onTimer(), the Sleep() and the TimeLocal() functions seem not supported by the Strategy Tester. So I was wondering what was left.

Is that too much too ask?

 
ernest02: Is that too much too ask?
learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
Was that so hard that you couldn't even attempt it?
ernest02: Can anybody guide me in finding an acceptable solution for my need to read the price every so many seconds and put the price that is read in an array every time?
Just typed
static datetime lastTime=0;
static double   prices[];
datetime now = TimeCurrent();
if( now > lastTime + SoManySeconds){
   lastTime = now;
   int size = ArraySize(prices);
   ArrayResize(prices, size + 1);
   prices[size] = Bid;
}
Just typed
 

WHRoeder I see you have a good heart after all! :-) Thank you for the code snippet.

It may be of interest to you that I am not a programmer but only a tinkerer with MQL4 to be able to test my systems and theories in a short period of time. 

I am 72 years of age, but are still trying to do the things you young guys find so easy.

So THANK YOU very much for that help. You have most probably saved me hours or even days of frustration.

Reason: