Did you find out what's going on? I'm having the same issue here.
If called upon each OnTick() event, shouldn't both pieces of code below return the same data?
Piece #1:
MqlTick tick1; SymbolInfoTick(_Symbol, tick1);
Piece #2:
MqlTick tick2; MqlTick last_ticks[]; CopyTicks(_Symbol, last_ticks, COPY_TICKS_ALL, 0, 1); tick2 = last_ticks[0];
I mean... Shouldn't tick1 be equal to tick2?
Hi,
I'm trying build a tick indicator and while debugging I run in to this problem. So I create a test code as below.
The code below get latest tick data from SymbolInfoTick and CopyTick then compare the time in msc if it is the same tick or not which it should always be the same since it is the latest tick?
When Run in strategy tester, in the first loop, the tick data's time msc is always different. However, it's seldomly show when test in realtime or attach to chart. So I got a little bit confusion about how tick data operate in realtime.
I know this is such a minor. But I have got some inconsistance errors when running in realtime and this might be the cause.
Sorry for bad english
Did you find out what's going on? I'm having the same issue here.
If called upon each OnTick() event, shouldn't both pieces of code below return the same data?
Piece #1:
Piece #2:
I mean... Shouldn't tick1 be equal to tick2?
Hello everyone, how's it going?
Do you have any news about your issue?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I'm trying build a tick indicator and while debugging I run in to this problem. So I create a test code as below.
The code below get latest tick data from SymbolInfoTick and CopyTick then compare the time in msc if it is the same tick or not which it should always be the same since it is the latest tick?
When Run in strategy tester, in the first loop, the tick data's time msc is always different. However, it's seldomly show when test in realtime or attach to chart. So I got a little bit confusion about how tick data operate in realtime.
I know this is such a minor. But I have got some inconsistance errors when running in realtime and this might be the cause.
Sorry for bad english