As a supplement to your information, I get the following ...
#define PrintTickFlag( _flag ) PrintFormat( "%+24s = %8d = %8X", #_flag, _flag, _flag ) void OnStart() { PrintTickFlag( TICK_FLAG_BID ); PrintTickFlag( TICK_FLAG_ASK ); PrintTickFlag( TICK_FLAG_LAST ); PrintTickFlag( TICK_FLAG_VOLUME ); PrintTickFlag( TICK_FLAG_BUY ); PrintTickFlag( TICK_FLAG_SELL ); PrintTickFlag( COPY_TICKS_INFO ); PrintTickFlag( COPY_TICKS_TRADE ); PrintTickFlag( COPY_TICKS_ALL ); PrintTickFlag( COPY_TICKS_VERTICAL ); PrintTickFlag( COPY_TICKS_TIME_MS ); PrintTickFlag( COPY_TICKS_BID ); PrintTickFlag( COPY_TICKS_ASK ); PrintTickFlag( COPY_TICKS_LAST ); PrintTickFlag( COPY_TICKS_VOLUME ); PrintTickFlag( COPY_TICKS_FLAGS ); };TICK_FLAG_BID = 2 = 2 TICK_FLAG_ASK = 4 = 4 TICK_FLAG_LAST = 8 = 8 TICK_FLAG_VOLUME = 16 = 10 TICK_FLAG_BUY = 32 = 20 TICK_FLAG_SELL = 64 = 40 COPY_TICKS_INFO = 1 = 1 COPY_TICKS_TRADE = 2 = 2 COPY_TICKS_ALL = 3 = 3 COPY_TICKS_VERTICAL = 32768 = 8000 COPY_TICKS_TIME_MS = 65536 = 10000 COPY_TICKS_BID = 131072 = 20000 COPY_TICKS_ASK = 262144 = 40000 COPY_TICKS_LAST = 524288 = 80000 COPY_TICKS_VOLUME = 1048576 = 100000 COPY_TICKS_FLAGS = 2097152 = 200000
You are mixing different things.
1. Your code is using the raw mql CopyTicksRange(). While your documentation link is for the matrix/vector function CopyTicksRange() which is different.
2. Your are mixing the COPY_TICKS_xxx flags and the TICK_FLAG_xxx.
- www.mql5.com
You are mixing different things.
1. Your code is using the raw mql CopyTicksRange(). While your documentation link is for the matrix/vector function CopyTicksRange() which is different.
2. Your are mixing the COPY_TICKS_xxx flags and the TICK_FLAG_xxx.
That may be the case, but the documentation is still incorrect ... Documentation on MQL5: Matrix and Vector Methods / Initialization / CopyTicks
Below is a copy of the online version and the values are incorrect as demonstrated in my code above.
ENUM_COPY_TICKS
The ENUM_COPY_TICKS enumeration contains the flags to specify the type of data to be passed to the matrix or array. The flag combination allows getting several series from the history in one request. The order of the rows in the matrix will correspond to the order of the values in the ENUM_COPY_TICKS enumeration. In other words, the row with High data will always be higher in the matrix than the row with Low data.
ID
Value
Description
COPY_TICKS_TIME_MS
1
Tick time in milliseconds
COPY_TICKS_BID
2
Bid price
COPY_TICKS_ASK
4
Ask price
COPY_TICKS_LAST
8
Last price (last deal price)
COPY_TICKS_VOLUME
16
Last price Volume
COPY_TICKS_FLAGS
32
Tick Flags
Data arrangement
COPY_TICKS_VERTICAL
32768
Ticks are copied into the matrix along the vertical axis. The received ticks will be arranged vertically in the matrix, i.e., the oldest ticks will be in the first row, while the most recent ticks will be in the last matrix row.
With default copying, ticks are added into a matrix along the horizontal axis.
The flag is only applicable when copying to a matrix.
- www.mql5.com
That may be the case, but the documentation is still incorrect ... Documentation on MQL5: Matrix and Vector Methods / Initialization / CopyTicks
Below is a copy of the online version and the values are incorrect as demonstrated in my code above.
ENUM_COPY_TICKS
The ENUM_COPY_TICKS enumeration contains the flags to specify the type of data to be passed to the matrix or array. The flag combination allows getting several series from the history in one request. The order of the rows in the matrix will correspond to the order of the values in the ENUM_COPY_TICKS enumeration. In other words, the row with High data will always be higher in the matrix than the row with Low data.
ID
Value
Description
COPY_TICKS_TIME_MS
1
Tick time in milliseconds
COPY_TICKS_BID
2
Bid price
COPY_TICKS_ASK
4
Ask price
COPY_TICKS_LAST
8
Last price (last deal price)
COPY_TICKS_VOLUME
16
Last price Volume
COPY_TICKS_FLAGS
32
Tick Flags
Data arrangement
COPY_TICKS_VERTICAL
32768
Ticks are copied into the matrix along the vertical axis. The received ticks will be arranged vertically in the matrix, i.e., the oldest ticks will be in the first row, while the most recent ticks will be in the last matrix row.
With default copying, ticks are added into a matrix along the horizontal axis.
The flag is only applicable when copying to a matrix.
That's right.
However I don't see why the values matter. They should not be used.
You are mixing different things.
1. Your code is using the raw mql CopyTicksRange(). While your documentation link is for the matrix/vector function CopyTicksRange() which is different.
2. Your are mixing the COPY_TICKS_xxx flags and the TICK_FLAG_xxx.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
these days I began downloading ticks with CopyTicksRange. I am just getting tick flags that I can't interpret. This is from Reference:
When I observe every tick flag value in debugger I get this:
But when I download the ticks and print their values in the log, I am mainly getting values of 12 and 14:
Not sure what to make of it. Or because they are "bit flags" they might be combined in a manner that I don't understand.
It is not critical for what I am going to do, but I am guessing that the reference has to be updated, or is it broker specific?
However. If you require the EA code I would be curious if you had the same result:
If you are aware of an article or forum topic that didn't catch my eye, please share, I found a lot of topics about CopyTicks in the search but haven't seen my topic browsing through the first two pages. Thanks in advance.