
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
I would like to remind you that OnTick receives two independent threads, information and trade,COPY_TICKS_INFO and COPY_TICKS_ALL and undergoes preprocessing .
These threads are not synchronized with each other, so if you compare OnBookEvent with OnTick, you should takeTICKS_INFO.
By definition, OnBookEvent should be faster since it doesn't go through pre-processing.
The tests do not reliably determine who is faster, because we do not know the stock time of a tick, unlike ticks.
Although, we have many times asked developers to ADD STOCK TIME! ! !
p.s. besides speed, tumblr also has advantages over OnTick,
as already stated, it is not possible to get better Bid and Ask prices in OnTick,
andOnTick has no data from other symbols, it is useless for Expert Advisors analyzing several symbols.
changedCOPY_TICKS_ALL toCOPY_TICKS_INFO
Result
Marked in yellow - same tick!
There's probably an inaccuracy in the code after all...?For a second there, it seemed like you had a desire to sort things out and it would help temper your pride.
No, it just seemed that way.
In general, the question is solved, and anyone can watch yours and fxsaber's and my codes, and draw conclusions.
With you I stop dialogue, nothing except loud shouting from you comes, and on reception of the information your brain does not work at all.
Good luck on FORTS.
I would like to remind you that OnTick receives two independent threads, information and trade,COPY_TICKS_INFO and COPY_TICKS_ALL and undergoes preprocessing .
These threads are not synchronized with each other, so if you compare OnBookEvent with OnTick, you should takeTICKS_INFO.
Sergei, we use On-functions simply as an entry point.
The question was which entry point would come first (while giving the same correct information about the last tick).
Run my EA, and look at the log. The time of the event (accurate to ms) and the time of the last known tick (also with ms) are output in the log.
Just analyse a few individual ticks for "who's earliest".
OnBookEvent should by definition be faster as it doesn't go through pre-processing.
I don't think OnTick does. And the tests confirm it, there's no delay.
As it was already said, it's impossible to get better Bid and Ask price in OnTick.
Possibly with CopyTicks.
Run my EA, and look at the log. The time of the event (accurate to ms) and the time of the last known tick (also with ms) are output to the log.
Just analyse a few individual ticks for "who's earliest".
A common situation is when OnBook comes at the same time as OnTick or 1-2ms later. But there are lags as well:
In 5 hours' time:
Twice as many OnBook events. Pity not all of them carry a useful load (if best bid/ask and flipper are needed).
Sergey, we are using the On-functions simply as an entry point.
The question was which entry point would come first (while giving the same correct information about the last tick).
Run my EA, and look at the log. The time of the event (accurate to ms) and the time of the last known tick (also with ms) are output in the log.
Just analyse a few individual ticks for "who's earliest".
This is you doing it wrong. Perhaps the tumblr event has arrived but has not yet made it into the tick history. You should be comparing Bid Ask prices, not digging into the tick history.
I don't think OnTick passes it. And the tests confirm it, there is no delay.
Before entering the history the ticks are necessarily processed and also distributed to all necessary charts, indicators and Expert Advisors. And all this in MT5 is done sequentially (not paralleled).
Perhaps with the help of CopyTicks.
Просто проанализируйте несколько отдельных тиков на предмет "кто раньше".
I've got a different way of doing things:
blue lines are OnBook,
The red ones are OnCalculat = OnTick.
If you are interested, I can show you the code
I get it differently:
blue lines are OnBook ,
red OnTick .
If interested, I can show the indicator code
No Serezha!
It must be admitted that OnBookEvent() and OnTick() all ticks are the same (I had a bug in the code),
but other DOM changes are not reflected in OnTick() in any way
This is not important for FOREX traders. (Cautious quote from the message above: " There are 2 times more OnBook events. It's a pity that not all of them carry a payload (if you need a best bid/ask and a last)". )
Corrected code:
Результат (фрагмент)
No Seryozh!
I have to admit that OnBookEvent() and OnTick() all the ticks coincide (I had an error in the code),
but other changes in the glass are not reflected in OnTick()
For FOREX people it doesn't matter.(Cautious quote from post above: "2 times more OnTick events. Too bad not all of them carry a useful load (if you need best bid/ask and flipper)".)
Corrected code:
Result (snippet).
Ticks in history of course will match, but in the picture above, it turns out not all info-ticks get to history or are skipped in OnCalculat.
I don't know if there is an error, I will try to fix it on Monday.
Or maybe for real time, instead of
use
Why copy when you can immediately get the current price?
In theory, CopyTicks has in its guts extra parameter checks, thus increasing the length of code in the function body.
But SymbolInfoTick has no additional parameters, and in theory, the implementation of this function should contain less code.
Less code means faster execution.
The only bad thing is that the SymbolInfoTick function doesn't have detailed documentation similar to CopyTicks and it's not completely clear how it works.
Does it cache, or does it give back the raw data immediately.