
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
Replace OnBookEvent in your code with OnTick, and compare the result.
You can't compare results :)
You need to run both EAs at the same time to compare results.
But I already know that it will be the same, BUT
but if I run OnTick(), there will sometimes be a delay in results,
i.e. not real time.
You can't compare results :)
You have to run both EAs to compare results.
But I already know that it will be the same, BUT
only if it is OnTick(), there will be a delay in results,
i.e. not real time.
There won't be a delay. On the contrary, if you subscribe to many instruments to update the stack, OnTick may work faster. Don't be lazy to compare.
There will be no delay. On the contrary, if you subscribe to the stock updates on many instruments, OnTick may work faster. Don't be lazy to compare.
And why not subscribe to all the stakes that are possible?
You could come up with something else.
On a single tool with a single tick subscription, OnBookEvent() is triggered more often than OnTick().
A new pack of ticks arrives - OnBookEvent() is triggered.
If you don't like my version, write your own.
By the way, the result is higher, with 84 tumblers signed on the real!
Added
Here is more
Added
And let's call it a day!
You have only fantasies and assumptions, and
I have 7 years of experience in writing robots and successful trading on FORTS +
I have a concrete working code.
There was an error in the code.
Posted with corrections on page 5
https://www.mql5.com/ru/forum/331060/page5#comment_14783678
Why not sign up for all the tumblers that are possible?
You can think of something else.
On one tool with a single glass subscription, OnBookEvent() is triggered more often than OnTick()
What difference does it make how many OnBookEvent events come in? You stated that when it receives ticks it will happen earlier than OnTick. And I suggested to check this, to output the time of receiving a tick there and there (just not in the same EA).
And let's end it there!
You have only fantasies and assumptions, and
And I have 7 years of experience in writing robots and successful trading on FORTS +
I have a specific working code.
You have the aplomb that reverberates through all your messages. Why have you decided that FORTS can work only from OnBookEvent - only you know.
But respect for the code. When I find time, I will post mine. This is not a priority task.
What difference does it make how many OnBookEvent events arrive? You stated that when a tick is received in it, it will happen earlier than in OnTick. And I suggested you check it, output the timing of receiving a tick there and there (just not in the same EA).
You have an aplomb that reverberates through every post. Why have you decided that FORTS can work only from OnBookEvent - only you know.
But respect for the code. When I find time, I will post mine. This is not a priority task.
You can work through whatever you like!
I've posted my solution, based on my experience working on FORTS.
I would agree with you if I were to say that I was tooconfident in my behaviour, in my speech.
Would agree with you if I didn't have experience.
Time of first OnTick()2020.01.30 19:31:11.112
Time of second OnTick()2020.01.30 19:31:11.802
That is, 690 ms have passed, meanwhile, between the OnTick() of these 690 ms
OnBookEvent() was triggered 15 times
Do you think these triggers have nothing to do with ticks?
Well, read the help for OnBookEvent()
New tick batch arrives - OnBookEvent() is guaranteed to trigger - this provides opportunity to get the ticks in real time with CopyTicks().
While with OnTick() you can get only ticks from the history.
You receive them all and nothing is missing, but not in real time.
It's very strange that I have to explain all this in such detail to someone with a lot of experience.
Once again, everyone is free to choose the programming and trading methods they like!
Added
There is another important point that many people forget.
This is the speed at which the EA makes a decision by analyzing the input data.
Using OnBookEvent() instead of OnTick(), my EA will be faster than yours.
Time of first OnTick()2020.01.30 19:31:11.112
time of second OnTick()2020.01.30 19:31:11.802
That is, 690 ms have passed, meanwhile, between the OnTick() of these 690 ms
OnBookEvent() was triggered 15 times
Do you think these triggers have nothing to do with ticks?
Please print out the values of the ticks as well. You can't see from the above log that OnBookEvent has caught a change in the MqlTick structure.
Putting SellLimit outside the spread will create an OnBookEvent event, but will not generate a trade or BestBid/BestAsk/BestVolume change. I.e. INFO and LAST tick tapes (CopyTicks history) will not be updated.
Print out the tick values as well, please. The above log does not show that OnBookEvent caught the change of MqlTick structure.
If SellLimit is set outside the spread, it will create OnBookEvent event, but it will not generate a trade or BestBid/BestAsk/BestVolume change. I.e. INFO and LAST tick tapes (CopyTicks history) will not be updated.
Why print it out?
The first line of the OnBookEvent() description says
Why print it out?
The first line of OnBookEvent() description says
If you measure how many BookEvent events happen in an hour and how many records in CopyTicks, you can make a conclusion.
If you measure how many BookEvent events occur per hour and how many entries in CopyTicks, you can deduce.
There is the code above, check it out for yourself.
There is a working code.
I believe it works in real time and certainly faster,
than OnTick().
What is the problem? Do this, do that...
You have to post your working code to prove or disprove something!