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
Please advise which type of flag corresponds to number 24. Experimentally determined that
Please advise which type of flag corresponds to number 24. Experimentally determined that
Flags can be stacked. To determine which events occurred (Here"tick" is an array with ticks):
if((tick.flags &TICK_FLAG_BID)==TICK_FLAG_BID)
flags=" TICK_FLAG_BID ";
if((tick.flags &TICK_FLAG_ASK)==TICK_FLAG_ASK)
flags+=" TICK_FLAG_ASK ";
if((tick.flags &TICK_FLAG_LAST)==TICK_FLAG_LAST)
flags+=" TICK_FLAG_LAST ";
if((tick.flags &TICK_FLAG_VOLUME)==TICK_FLAG_VOLUME)
flags+=" TICK_FLAG_VOLUME ";
if((tick.flags &TICK_FLAG_BUY)==TICK_FLAG_BUY)
flags+=" TICK_FLAG_BUY ";
if((tick.flags &TICK_FLAG_SELL)==TICK_FLAG_SELL)
flags+=" TICK_FLAG_SELL ";
Comment(flags);
Good afternoon, colleagues.
Maybe someone will be interested to model a problem, which I encountered - it seems that CopyTicks in strategy tester in mode "Every tick based on real ticks" in some cases begins to double ticks, which are returned by one request.
Checked it on MOEX RTS in Expert Advisor, by requesting new ticks in OnTimer() event. See attached code.
TheTICK_FLAG_BUYTICK_FLAG_SELLflagsof doubles may be repeated and may be different from the original records (though to understand which of them are originals and which are duplicates, is impossible without comparing with another source of ticks).
I tried to connect to the real "Opening" and MetaQuotes-Demo - the result is the same.
Checked also on build 1578. Deleted all ticks folders on my machine. After auto-updating them the result is the same.
Here is a fragment of the log showing that one request has suddenly started repeated ticks (with shorter time than previous ones)
Startup MetaTester 5 x64 build 1578 (07 Apr 2017)
Server MetaTester 5 started on 127.0.0.1:3000
Startup initialization finished
127.0.0.1 login (build 1578)
Network 38520 bytes of account info loaded
Network 1482 bytes of tester parameters loaded
Network 188 bytes of input parameters loaded
Network 4192 bytes of symbols list loaded
Tester expert file added: Experts\!sn_err.ex5. 11617 bytes loaded
Tester initial deposit 10000.00 RUR, leverage 1:100
Tester successfully initialized
Network 29 Kb of total initialization data received
Tester QEMU Virtual version (cpu64-rhel6), 2047 MB
Symbols RTS-6.17: symbol to be synchronized
Symbols RTS-6.17: symbol synchronized, 3784 bytes of symbol info received
History RTS-6.17: history synchronization started
History RTS-6.17: load 31 bytes of history data to synchronize in 0:00:00.000
History RTS-6.17: history synchronized from 2016.01.20 to 2017.04.07
Ticks RTS-6.17: ticks synchronization started
Ticks RTS-6.17: load 38 bytes of tick data to synchronize in 0:00:00.000
Ticks RTS-6.17: history ticks synchronized from 2017.04.06 to 2017.04.06
History RTS-6.17,M1: history cache allocated for 475200 bars and contains 23851 bars from 2016.01.20 12:28 to 2017.04.05 23:45
History RTS-6.17,M1: history begins from 2016.01.20 12:28
Tester RTS-6.17,M1 (MetaQuotes-Demo): generating based on real ticks
Tester RTS-6.17,M1: testing of experts\!sn_err.ex5 from 2017.04.06 00:00 to 2017.04.07 00:00 started
Ticks RTS-6.17 : real ticks start from 2017.04.06 00:00:00
...
CYCLE: 16 TICK: 2017.04.06 11:06:42;1491476802652;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 16 TICK: 2017.04.06.06 11:06:43;1491476803512;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 16 TICK: 2017.04.06.06 11:06:46;1491476806819;2;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 16 TICK: 2017.04.06.06 11:06:46;1491476806865;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 16 TICK: 2017.04.06.06 11:06:46;1491476806865;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807075;1;88; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_SELL
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807470;3;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807470;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807470;10;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807470;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807470;4;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807470;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807472;3;88; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_SELL
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807472;4;88; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_SELL
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807472;1;88; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_SELL
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807075;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06.06 11:06:47;1491476807470;3;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807470;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807470;10;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807470;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807470;4;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807470;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807472;3;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807472;4;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 17 TICK: 2017.04.06 11:06:47;1491476807472;1;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY DOUBLE
CYCLE: 19 TICK: 2017.04.06 11:06:49;1491476809747;3;88; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_SELL
CYCLE: 19 TICK: 2017.04.06.06 11:06:49;1491476809747;7;88; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_SELL
CYCLE: 19 TICK: 2017.04.06.06 11:06:49;1491476809747;3;56; TICK_FLAG_LAST TICK_FLAG_VOLUME TICK_FLAG_BUY
...
Perhaps someone would be interested to simulate a problem I encountered - it seems CopyTicks in strategy tester in "Every tick based on real" mode in some cases starts to double ticks returned by one request.
This is a very unpleasant thing in your situation.
So there is only one way out - to give up the tester for a while.
SZZ Looked your code and log. Definitely bug CopyTicks in the tester. Interesting, DOUBLE-ticks doesn't start with full duplication. Anyway, copy-paste your post to the SD. At the moment CopyTicks cannot be used in the tester and the tester itself cannot be used in "by real ticks" mode.
A very unpleasant thing has come up in your situation.
So there's only one way out - to give up the tester for a while.
Looked your code and log. Definitely a bug CopyTicks in the tester. Interesting, DOUBLE-ticks doesn't start with full duplication. Anyway, copy-paste your post to the SD. At the moment CopyTicks cannot be used in the tester and the tester itself cannot be used in "by real ticks" mode.
Thank you, I have sent a message to servicedesk. I will write back with the results.
In the history correct ticks go from a certain date (wrote earlier about it). Before that they go with duplicates. This is if the account is in the Open.
The logs show that the test was conducted for April 06, 2017. Similar results for April 07.
The situation is similar on both Opening-Real and MQ-Demo
The logs show that the test was conducted for April 06, 2017. Similar results for 07 April.
The situation is similar on both Opening-Real and MQ-Demo
To the morgue, then. I mean, the SR.)
That's a very good point.
It's been three months and the ticket still hasn't been closed. Trouble.
Additionally, I found another bug (if the problem is not related to the quote provider), this time with wrong direction of transaction. I'm copying the text of the ticket to warn the community:
A comparison of MT5 tick data obtained by the standard tool "Price Stack / Show All Trades Table" on a real AMP-Features account with quotes from CQG, with data from Ritmik has shown that MT5 in some apparently quite rare cases incorrectly determines the direction of the trade.
We unload the Depth of Market for 11.07 using the standard tool "Depth of Market / Show table of all deals". Look at the data on futures GCEQ7 as of 00:03 min Chicago time (in the table below it is not Chicago time but GMT)
Result.
Expected result
Data from Rithmic as per Moscow time:
Discrepancies in the direction of transactions are shown in red