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
There is no looking ahead, because if there are ticks for several symbols at time X, then alongside the first event on one of the instruments, the other symbols (for which events are still in the queue) will have the previous tick, not the next tick (as in the example, 00:04 came before 00:05, not after).
To ensure synchronisation, you need to implement it algorithmically in your code; for example, in the OnTick handler, you should query the tick times for all relevant symbols before initiating a trade. However, in principle, if the arbitrage is based specifically on ticks (rather than bars or minutes), it is difficult to envisage reliable synchronisation, because ticks for certain instruments may actually be absent for several seconds.
It’s all relative; for one instrument there will be a lag, whilst for another there will be a lead.
Everything fluctuates there; in the debugger, everything is synchronised, even with an almost empty OnTick function.
I have to convert bars into ticks for testing, to properly simulate the commission and spread.
I had to do this in OnTick so that the custom tester’s calculations matched those of MT4.
To ensure synchronisation, you need to implement it algorithmically in your code; for example, in the OnTick handler, you should check the tick times for all relevant symbols before initiating a trade.
I’m afraid this won’t allow the OnTick handler to recognise that the sequence of ticks with the current time has ended. Most likely, only a millisecond OnTimer will help.
Everything is relative; for one instrument there will be a lag, whilst for another there will be a lead.
I’m afraid this won’t allow OnTick to recognise that the sequence of ticks with the current time has ended. Most likely, only a millisecond OnTimer will help.
It depends on how you write the condition in the `if` statement based on time – you need a strict `>` rather than `>=`, and you mustn’t count the tick that triggered the condition.
It’ll work the same way with a timer.
I don’t understand.
Off the top of my head, with time identification accurate to the millisecond (the same applies to seconds):
But I’ll say it again (for Rorschach’s sake) that synchronisation at such fine intervals is illusory. Ticks from a particular instrument may be absent for seconds at a time, in which case the price relevant to them may in fact become ‘out of date’. If it is important to someone that all prices are for the exact same [milli]second, then in the code snippet provided (in the commented-out analysis block), you need to additionally check that the tick times are equal, and only trade if this condition is met.
Off the top of my head, with time identification accurate to the millisecond (the same applies to seconds):
This method cannot guarantee that the ticks for all instruments are up to date. This can only be achieved using a millisecond OnTimer.
Stanislav Korotky #:
Что подразумевается под актуальностью (этот метод отдает последние известные тики по всем инструментам)?
There will be no more ticks with the last known time.
And how would OnTimer produce a different result?
A millisecond OnTimer guarantees that all ticks have elapsed BEFORE this timer event. In other words, the ticks are up to date for all symbols.