Synchronise Windows local time with the MT5 server - page 9

 

ChangedCOPY_TICKS_ALL toCOPY_TICKS_INFO

and still no match.

2017.01.23 23:05:58.985 TestTicks (ALRS-3.17,H1)        New test start.
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Total 2000 ticks.
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.109 last =60497.0 flags = 2
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:01.110 last =60496.0 flags = 6
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:01.113 last =60496.0 flags = 4
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:01.700 last =60498.0 flags = 2
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:02.675 last =60498.0 flags = 6
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:13.854 last =60495.0 flags = 6
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:14.210 last =60495.0 flags = 4
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:16.726 last =60494.0 flags = 4
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:17.109 last =60495.0 flags = 4
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:17.543 last =60494.0 flags = 4
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:17.543 last =60494.0 flags = 2
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:18.272 last =60496.0 flags = 4
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:19.144 last =60493.0 flags = 2
2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:19.147 last =60492.0 flags = 4
 

CopyTicks log shows 1 tick in 1 second

2017.01.23 23:05:59.077 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.109 last =60497.0 flags = 2

And in the stock exchange log

replID            replRev     replAct     id_ord      sess_id   isin_id amount amount_rest id_deal xstatus status  price              moment           dir    action  deal_price
61121596561     61121596561     0       24657039482     5205    795262  5       5       0       5121    5121    60498.00000     2017-01-20 23:49:00.017 2       1       0.00000
61121596564     61121596564     0       24657039483     5205    795262  2       2       0       5121    5121    60497.00000     2017-01-20 23:49:00.020 1       1       0.00000
61121596784     61121596784     0       24653666035     5205    795262  1       0       0       2102273 2102273 60226.00000     2017-01-20 23:49:00.060 1       0       0.00000
61121596860     61121596860     0       24653666013     5205    795262  1       0       0       2102273 2102273 60898.00000     2017-01-20 23:49:00.060 2       0       0.00000
61121596863     61121596863     0       24657039505     5205    795262  5       5       0       5121    5121    60499.00000     2017-01-20 23:49:00.060 2       1       0.00000
61121596874     61121596874     0       24657011636     5205    795262  100     0       0       2102273 2102273 60421.00000     2017-01-20 23:49:00.063 1       0       0.00000
61121596881     61121596881     0       24656457983     5205    795262  1       0       0       2102273 2102273 60386.00000     2017-01-20 23:49:00.063 1       0       0.00000
61121596944     61121596944     0       24656457986     5205    795262  1       0       0       2102273 2102273 60596.00000     2017-01-20 23:49:00.067 2       0       0.00000
61121597008     61121597008     0       24657039527     5205    795262  100     100     0       5121    5121    60397.00000     2017-01-20 23:49:00.073 1       1       0.00000
61121597151     61121597151     0       24657039552     5205    795262  3       3       0       1025    1025    60497.00000     2017-01-20 23:49:00.087 2       1       0.00000
61121597221     61121597221     0       24657039555     5205    795262  22      22      0       1026    1026    60494.00000     2017-01-20 23:49:00.090 2       1       0.00000
61121597250     61121597250     0       24657039400     5205    795262  1000    0       0       2102273 2102273 60477.00000     2017-01-20 23:49:00.093 1       0       0.00000

2/3 of it did not fit :( only 69 ticks
 

Checked stock exchange log for isin_id (instrument) everywhere only 795262 ( Si-3.17)

Added

ChangedCOPY_TICKS_INFO toCOPY_TICKS_TRDAE

I don't understand deals either...

61121597156     61121597156     0       24657039552     5205    795262  3       0       1693721366      1                               1       60497.00000     2017-01-20 23:49:00.087 2       2       60497.00000
61121597157     61121597157     0       24657038660     5205    795262  3       60      1693721366      9223372034707296257     -2147479551     60497.00000     2017-01-20 23:49:00.087 1       2       60497.00000
61121597226     61121597226     0       24657039555     5205    795262  22      0       1693721376      9223372034707292162     -2147483646     60494.00000     2017-01-20 23:49:00.090 2       2       60497.00000
61121597227     61121597227     0       24657038660     5205    795262  22      38      1693721376      9223372034707296257     -2147479551     60497.00000     2017-01-20 23:49:00.090 1       2       60497.00000
61121597265     61121597265     0       24657039558     5205    795262  2       0       1693721380      1                               1       60497.00000     2017-01-20 23:49:00.093 2       2       60497.00000
61121597266     61121597266     0       24657038660     5205    795262  2       36      1693721380      9223372034707296257     -2147479551     60497.00000     2017-01-20 23:49:00.093 1       2       60497.00000
2017.01.23 23:40:10.786 TestTicks (ALRS-3.17,H1)        New test start.
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Total 2000 ticks.
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.88 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.90 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.94 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.109 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.114 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.114 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.114 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.114 last = 60497.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.147 last = 60496.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.502 last = 60496.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.529 last = 60496.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.581 last = 60496.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.624 last = 60496.0 flags = 88
2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.669 last = 60498.0 flags = 56

there is buying and selling (dir - order direction 1 - BUY; 2 - SELL) (action: 0 - order removed; 1 - order set; 2 - trade) (amount_rest - balance)

61121597156     61121597156     0       24657039552     5205    795262  3       0       1693721366      1                               1       60497.00000     2017-01-20 23:49:00.087 2       2       60497.00000
61121597157     61121597157     0       24657038660     5205    795262  3       60      1693721366      9223372034707296257     -2147479551     60497.00000     2017-01-20 23:49:00.087 1       2       60497.00000

And we have only sell

2017.01.23 23:40:11.947 TestTicks (ALRS-3.17,H1)        Symbol = Si-3.17 Time = 2017.01.20 23:49:00.88 last = 60497.0 flags = 88

Perhaps this is because these two deals were merged into one (their id_deal is the same)1693721366

Added

It turns out that onlyCOPY_TICKS_TRDAE works correctly?

(All tests were done on real Otkritie, build 1495, 64-bit, Access server IV)

 

I was not lazy and edited the Exchange file and it turned out that per minute on Si-3.17

460 deals were made, and the CopyTicks() withCOPY_TICKS_TRDAE test showed that there were 294 deals

Logs in the basement

Files:
Si_deals.zip  45 kb
 
prostotrader:

I was not lazy and edited the Exchange file and it turned out that per minute on Si-3.17

460 deals were made, and the CopyTicks() withCOPY_TICKS_TRDAE test showed that there were 294 deals

Logs in the basement

CopyTicks is lying - urgent to SR!
 
fxsaber:
CopyTicks is lying - urgently to the SD!

Already posted application#1656450

Added by

Only, I think it's the history ticks feature that's lying.

At the time I was writing the indicator "indicator of all trades"

I had inconsistencies with the history.

 

Oooop`s!

The crutch worked correctly!

2017.01.24 10:00:00.005 Time_sync_forts (URKA-3.17,H1)  Local time sync is done. Symbol = RTS-3.17 Sync hour = 10 Sync min = 0 Sync sec = 0 Sync ms = 5
2017.01.24 10:00:02.764 trader (ED-3.17,H1) OnTradeTransaction: Сделка совершена. Билет = 51601238


And the job was done!

2017.01.24 10:00:02.763 Trades  'ххххх': deal #33631469 sell 1.00 ED-3.17 at 1.0761 done (based on order #51601238)


Expert code attached.

Files:
 

I have added daytime clearing, but evening clearing will not work,

because the bidding starts at 7:00 p.m. and 7:05 p.m.

Files:
 
fxsaber:
CopyTicks is lying - urgently to the SR!
The SR wrote that the application has been accepted for execution...
 
prostotrader:
The SR wrote that the application has been accepted for execution...
Keep in touch, please. @Dmitriy Skub claimed that the copytix history matches the stock exchange data 100%.