Scripts: ThirdPartyTicks - page 9

 
fxsaber, thanks, it works!
 
Sergey Lebedev:

Today I was also dealing with this script and I still as well as traveller00 2 have an understanding that there is a double check for the presence of refresh: suppose that Sync = t rue(i.e. there is a need to make Refresh).

- first we run Refresh() - in the section of all symbols we have determined whether there are updates on the server,

We got the list of Online and Offline files.

- then run Update(false) - download new zip files on a particular symbol, false prevents repeated Refresh,

Download the difference in the lists.

- then execute ToCustomSymbol(Sync, false, MinPips) - here we rebuild the custom symbol, but if initially Sync = t rue, there is a repeated call of Refresh(true) .

Since there was synchronisation, after uploading we need to refresh the Offline list to start parsing the quotes from it.

 
The source of ticks for the script now has MT5. So it is possible (haven't tried it) directly.
 
I checked. Sometimes even the candles on M15 don't match.
Files:
Image1.png  25 kb
 
Evgenii Kuznetsov:
I checked. Sometimes even the candles on M15 don't match.

They don't have to match. Shift ticks by one millisecond and you will see how even H1 bars have changed.

 
fxsaber:
The source of ticks for the script now has MT5. So it is possible (haven't tried it) to use it directly.

Either I'm unlucky or it's better not to use directly. Ran for the last 3 months

AUDNZD : 2020.03.02 23:59 - real ticks absent for 72 minutes out of 1435 total minute bars within a day
AUDNZD : 2020.03.02 23:59 - real ticks discarded for 1363 minutes out of 1435 total minute bars within a day
AUDNZD : 2020.03.02 23:59 - 151776 tick prices mismatch for 1363 minute bars
AUDNZD : 2020.03.03 23:59 - real ticks absent for 894 minutes out of 1435 total minute bars within a day
AUDNZD : 2020.03.03 23:59 - real ticks discarded for 541 minutes out of 1435 total minute bars within a day
AUDNZD : 2020.03.03 23:59 - 72794 tick prices mismatch for 541 minute bars
AUDNZD : 2020.03.04 23:59 - all the real ticks discarded within a day
AUDNZD : 2020.03.04 23:59 - 105750 tick prices mismatch for 1435 minute bars
AUDNZD : 2020.03.05 23:59 - all the real ticks discarded within a day
AUDNZD : 2020.03.05 23:59 - 93130 tick prices mismatch for 1435 minute bars
AUDNZD : 2020.03.06 23:59 - real ticks absent for 4 minutes out of 1434 total minute bars within a day
AUDNZD : 2020.03.06 23:59 - real ticks discarded for 1430 minutes out of 1434 total minute bars within a day
AUDNZD : 2020.03.06 23:59 - 132351 tick prices mismatch for 1430 minute bars
AUDNZD : 2020.03.09 23:59 - real ticks absent for 1 minutes out of 1424 total minute bars within a day
AUDNZD : 2020.03.09 23:59 - real ticks discarded for 1423 minutes out of 1424 total minute bars within a day
AUDNZD : 2020.03.09 23:59 - 226074 tick prices mismatch for 1423 minute bars
AUDNZD : 2020.03.10 23:59 - all the real ticks discarded within a day
AUDNZD : 2020.03.10 23:59 - 189595 tick prices mismatch for 1436 minute bars
AUDNZD : 2020.03.11 23:59 - all the real ticks discarded within a day
AUDNZD : 2020.03.11 23:59 - 156645 tick prices mismatch for 1436 minute bars
AUDNZD : 2020.03.12 23:59 - all the real ticks discarded within a day
AUDNZD : 2020.03.12 23:59 - 239423 tick prices mismatch for 1436 minute bars
AUDNZD : 2020.03.13 23:59 - real ticks absent for 4 minutes out of 1379 total minute bars within a day
AUDNZD : 2020.03.13 23:59 - real ticks discarded for 1375 minutes out of 1379 total minute bars within a day
AUDNZD : 2020.03.13 23:59 - 240354 tick prices mismatch for 1375 minute bars
AUDNZD : 2020.03.16 23:59 - real ticks absent for 21 minutes out of 1436 total minute bars within a day
AUDNZD : 2020.03.16 23:59 - real ticks discarded for 1415 minutes out of 1436 total minute bars within a day
AUDNZD : 2020.03.16 23:59 - 232846 tick prices mismatch for 1415 minute bars
AUDNZD : 2020.03.17 23:59 - all the real ticks discarded within a day
AUDNZD : 2020.03.17 23:59 - 170369 tick prices mismatch for 1436 minute bars
AUDNZD : 2020.03.18 23:59 - real ticks absent for 2 minutes out of 1436 total minute bars within a day
AUDNZD : 2020.03.18 23:59 - real ticks discarded for 1434 minutes out of 1436 total minute bars within a day
AUDNZD : 2020.03.18 23:59 - 236843 tick prices mismatch for 1434 minute bars
AUDNZD : 2020.03.19 23:59 - all the real ticks discarded within a day
AUDNZD : 2020.03.19 23:59 - 322182 tick prices mismatch for 1436 minute bars
AUDNZD : 2020.03.20 23:59 - real ticks absent for 3 minutes out of 1379 total minute bars within a day
AUDNZD : 2020.03.20 23:59 - real ticks discarded for 1376 minutes out of 1379 total minute bars within a day
AUDNZD : 2020.03.20 23:59 - 212599 tick prices mismatch for 1376 minute bars
AUDNZD : 2020.03.23 23:59 - real ticks discarded for 1422 minutes out of 1429 total minute bars within a day
AUDNZD : 2020.03.23 23:59 - 363481 tick prices mismatch for 1422 minute bars
AUDNZD : real ticks begin from 2020.01.02 00:00:00
AUDNZD : 2020.03.01 00:00 - 2020.03.30 00:00  real ticks absent for 1001 minutes of 28527 total minute bars, every tick generation used
AUDNZD : 2020.03.01 00:00 - 2020.03.30 00:00  real ticks discarded for 21829 minutes of 28527 total minute bars, every tick generation used
AUDNZD : 2020.03.01 00:00 - 2020.03.30 00:00  real ticks discarded for 7 whole days
AUDNZD : 2020.03.01 00:00 - 2020.03.30 00:00  tick volumes not matched for 1429 minute bars
AUDNZD : 2020.03.01 00:00 - 2020.03.30 00:00  tick prices of 3146212 ticks not matched for 21829 minute bars
AUDNZD : 2020.03.01 00:00 - 2020.03.30 00:00  last prices absent for 7 minute bars, bid prices used
AUDNZD : 2020.03.01 00:00 - 2020.03.30 00:00  last prices absent for 1 whole days, bars built by bid prices
 
traveller00:

Either I'm unlucky or it's better not to use direct. I've been running it for the last three months

I was talking about the tick source, not the backtest on the original symbol.

MT5 Tester prioritises M1 bars over ticks. That's why there are so many errors in the log.

 
Yeah, I understand. I'm just saying that it's still better to create a custom symbol, even if not through the web, but a copy of the symbol directly. But it's better not to test directly on the symbol.
 
traveller00:
it is better not to test directly on the symbol.

Forum on trading, automated trading systems and testing trading strategies

Libraries: Symbol

fxsaber, 2020.03.26 08:02

If we open a demo account on Swissquote-Server and run this script, we will get the following line.

2020.03.26 08:53:12.567 5, 5

It means that in the tick history Bid/Ask prices differ by 5 pips from those broadcasted in the Market Watch (there are better prices there than in the history).

Accordingly, in the Tester you cannot recreate what you see in the Terminal on the original symbol.


The only solution is to use a custom symbol, which is based on the corresponding demarcap of the tick history.

I.e. Tester on the original symbol can produce fully synchronised tick and bar histories - no errors in the logs. Only the result will be bullshit.

 

I don't know if it's a bug or a feature, but it can cause errors. In unfiltered quote the instrument type remains forex.