the default is every tick u should have done something that runs only every 6 minutes and 15 seconds
WHAT DID YOU DO?
I want to do that!
https://www.mql5.com/en/code/10080
this indicator updates every 5 seconds. should be easy to modify it so that it updates every 6minutes and 15 sec....
is this using strategy tester? it can simulate N ticks per bar period, evenly spaced out, but not 6 mins 15 seconds :-(
shure everythink is simulatable::
static int t=0; static int TimeInSeconds= (6*60)+15; if(TimeCurrent()>(t+TimeInSeconds)){ //6 minutes and 15secodns have passed... }
I tried that and can't get it to compile, had to make some changes and the problem seems to be with TimeCurrent(). Basically, I want the inits to be global so that I can put an iteration in the if statement:
if(TimeCurrent()>(t+TimeInSeconds)){
....
//increment t by TimeInSeconds
}
so that I can repeat this like a loop. Also, I need t to initialize =TimeCurrent(), but I can't get it to do so.
Please he lp!
Try this--
extern int TimeInSeconds = 15; int start() { static int lastTime = 0; if(TimeCurrent() > lastTime+TimeInSeconds) { Comment("lastTime ", lastTime); lastTime = TimeCurrent(); } return(0); }

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I try to make my own EA.
I want it to run on every tick. Hov do I set that parameter ?
Tio Oso