Transition after 24 hours is correct. Test method: With the terminal on, I erased the tick history files. Then ran the script twice (since there was no history, the first run of the script initialized the history load).
Yes thanks, did the same - helped. However, very strange behaviour.
I have pointed out exactly - there is no structure or logic in filling in the ticks. Each price field is independent of the others. What comes from the supplier is what is translated.
Renat, it turns out that the same ticks can come from a supplier depending on the time of the request and in different ways!
Does the format of history depend on the server you are connected to?
This is promised to be in the next build and I'm sure it will have its chips.
It would be good if without "chips", and normally ... and got tired of these charts that say 99% simulation quality ... and the real one doesn't even come close :) For me, in principle, there shouldn't be such a thing, otherwise it's not a tester but a toy. And you can't make much gruel out of bar closing strategies...
It would be nice if there were no "tricks" and it was OK... but I'm tired of these charts that say 99% modelling quality... and the real one doesn't even come close :) For me, in principle, there shouldn't be such a thing, otherwise it's not a tester but a toy. And you can't make much gruel out of bar closing strategies...
Without chips, it rarely happens at once. This tick history has been awaited for a long time, and we want to finish it as soon as possible. I want it to be ready both in the tester and on the real account. Unfortunately, there is not much feedback. I hope the work to bring it up to speed is progressing.
Please specify the COPY_TICKS_INFO tick receiving flag (only Bid and Ask) - can Bid and Ask still be with the value "0" or in COPY_TICKS_INFO mode - Bid and Ask will not contain zeros and the tick flow will be similar to the onein the terminal, in "Market Watch" window, "Ticks" tab?
It will be solved in the build 1200:
MQL5: Extended format of MqlTick structure. Now, it contains the tick arrival time in milliseconds, as well as flags that allow determining which parameter of the tick has changed.
struct MqlTick
{
datetime time; // Время последнего обновления ценdouble bid; // Текущая цена Biddouble ask; // Текущая цена Askdouble last; // Текущая цена последней сделки (Last)ulong volume; // Объем для текущей цены Lastlong time_msc; // Время последнего обновления цен в миллисекундахuint flags; // Флаги тиков
};
Each tick always has all parameters filled in, regardless of whether the data have changed since the previous tick. This allows you to always have an up-to-date status of prices at any point in time without having to search through the tick history for previous values. For example, with a tick only the bid price might have changed, but the structure will contain other parameters in addition to the new price: previous ask price, volume, etc. To find out which data exactly have changed with the current tick, analyze its flags:
TICK_FLAG_BID - tick changed price bid
TICK_FLAG_ASK - tick changed the ask price
TICK_FLAG_LAST - tick changed price of last deal
TICK_FLAG_VOLUME - Tick has changed volume
TICK_FLAG_BUY - Tick occurred as a result of a buy deal
TICK_FLAG_SELL - the tick occurred as a result of a sell deal
MqlTick structure is used in two methods:
CopyTicks - the method doesn't support the old structure format. Previously compiled EX5 files that use the old tick format will return error 4006 (ERR_MQL_INVALID_ARRAY) when calling the CopyTicks function.
SymbolInfoTick - method supports both old and new structure format.
And how to properly track the arrival of a new tick in the terminal? For example, in the tester.
"Function OnTick() is not a handler of each tick, it notifies an Expert Advisor about changes in the market. Changes can be batch: several ticks can come to the terminal simultaneously, but the OnTick() function will be called only once to notify the Expert Advisor of the latest market condition".
What is the correct way to track the arrival of a new tick in the terminal? For example, in the tester.
"The OnTick() function is not a handler of each tick, it notifies the Expert Advisor about changes in the market. Changes can be batch: the terminal can receive several ticks at the same time, but the OnTick() function will be called only once to inform the Expert Advisor about the latest market condition".
If you want to track every tick, you must do it in the indicator. An indicator, unlike an EA, handles every tick.
Added: now it is possible to analyse all ticks in EA as well - only it is necessary to enter checks (for example to analyse CopyTicks request with depth of 5 ticks).
I have checked ticks downloading. For some instruments 500 ticks are downloaded at the first or second tick and they do not download more than 200 Kb (I simply drag and drop tools from Market Watch on a chart).
But in some instruments miracles happen: the history of ticks doesn't want to give me necessary 500 ticks, but the terminal downloads about 20 Mb of history (history for 10 and 9 months).
Here's what was asked for:
Transition after 24 hours is correct.
Test method: With the terminal on, I erased the tick history files. Then ran the script twice (since there was no history, the first run of the script initialized the history load).
The truth is that the strange behaviour doesn't end there. I decided to compare two query moments of the same story.
The first moment was yesterday when I wrote about the Friday to Monday arrival error:
Forum on trading, automated trading systems and trading strategy testing
Tick story
Tapochun, 2015.10.19 08:48
A little bit later - the picture is like this. ALL 3000 ticks mode:
Hole in the story. In INFO mode - similar.
Note the ticks coming in at 9.44.41 onwards. Now history for the same symbol, at the same time, in the same mode (ALL) only requested today:
The delivery method is different. And definitely milliseconds are missing.
And how to analyse ticks in this situation!
That's correct.
I have pointed out exactly - there is no structure or logic in filling in the ticks. Each price field is independent of the others. What comes from the supplier is what is translated.
Renat, it turns out that the same ticks can come from a supplier depending on the time of the request and in different ways!
Does the format of history depend on the server you are connected to?
This is promised to be in the next build and I'm sure it will have its chips.
It would be good if without "chips", and normally ... and got tired of these charts that say 99% simulation quality ... and the real one doesn't even come close :) For me, in principle, there shouldn't be such a thing, otherwise it's not a tester but a toy. And you can't make much gruel out of bar closing strategies...
It would be nice if there were no "tricks" and it was OK... but I'm tired of these charts that say 99% modelling quality... and the real one doesn't even come close :) For me, in principle, there shouldn't be such a thing, otherwise it's not a tester but a toy. And you can't make much gruel out of bar closing strategies...
Without chips, it rarely happens at once. This tick history has been awaited for a long time, and we want to finish it as soon as possible. I want it to be ready both in the tester and on the real account. Unfortunately, there is not much feedback. I hope the work to bring it up to speed is progressing.
Please specify the COPY_TICKS_INFO tick receiving flag (only Bid and Ask) - can Bid and Ask still be with the value "0" or in COPY_TICKS_INFO mode - Bid and Ask will not contain zeros and the tick flow will be similar to the onein the terminal, in "Market Watch" window, "Ticks" tab?
It will be solved in the build 1200:
Each tick always has all parameters filled in, regardless of whether the data have changed since the previous tick. This allows you to always have an up-to-date status of prices at any point in time without having to search through the tick history for previous values. For example, with a tick only the bid price might have changed, but the structure will contain other parameters in addition to the new price: previous ask price, volume, etc. To find out which data exactly have changed with the current tick, analyze its flags:
MqlTick structure is used in two methods:
So:
and the updated MqlTick structure:
So:
and updated MqlTick structure:
And how to properly track the arrival of a new tick in the terminal? For example, in the tester.
"Function OnTick() is not a handler of each tick, it notifies an Expert Advisor about changes in the market. Changes can be batch: several ticks can come to the terminal simultaneously, but the OnTick() function will be called only once to notify the Expert Advisor of the latest market condition".
What is the correct way to track the arrival of a new tick in the terminal? For example, in the tester.
"The OnTick() function is not a handler of each tick, it notifies the Expert Advisor about changes in the market. Changes can be batch: the terminal can receive several ticks at the same time, but the OnTick() function will be called only once to inform the Expert Advisor about the latest market condition".
If you want to track every tick, you must do it in the indicator. An indicator, unlike an EA, handles every tick.
Added: now it is possible to analyse all ticks in EA as well - only it is necessary to enter checks (for example to analyse CopyTicks request with depth of 5 ticks).
Build 1192. Windows 10 x32.
Preliminarily deleted the tick history folder of MetaQuotes-Demo server completely. Using indicator
I have checked ticks downloading. For some instruments 500 ticks are downloaded at the first or second tick and they do not download more than 200 Kb (I simply drag and drop tools from Market Watch on a chart).
But in some instruments miracles happen: the history of ticks doesn't want to give me necessary 500 ticks, but the terminal downloads about 20 Mb of history (history for 10 and 9 months).