are they the same? if I put my logic in start() it works just fine but void tick() doesn't seem to do anything. Also I realised that when the price spikes pretty quick, my EA can't really catch it in time with start() so I thought tick() might be a better use..but then I just read that they are the same?
- Questions from Beginners MQL5 MT5 MetaTrader 5
- Difference between OnStart() and OnTick()
- Big changes for MT4, in a few weeks
- There is no such void tick().
- Updated MQL4 - MQL4 Reference 2/2014 Start using the new calls. There will be no difference in timing.
i meant onTick() .. sorry
Fireche22:
are they the same? if I put my logic in start() it works just fine but void tick() doesn't seem to do anything. Also I realised that when the price spikes pretty quick, my EA can't really catch it in time with start() so I thought tick() might be a better use..but then I just read that they are the same?
are they the same? if I put my logic in start() it works just fine but void tick() doesn't seem to do anything. Also I realised that when the price spikes pretty quick, my EA can't really catch it in time with start() so I thought tick() might be a better use..but then I just read that they are the same?
Tested the following two versions and both are working as expected
"New" format :
int OnInit(void) { return(INIT_SUCCEEDED); } void OnDeinit(const int reason) {} void OnTick() { Comment("I am here "+TimeToString(TimeLocal(),TIME_SECONDS)); }
"Old" format :
int init(void) { return(INIT_SUCCEEDED); } int deinit() { return(0); } void start() { Comment("I am here "+TimeToString(TimeLocal(),TIME_SECONDS)); }
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register