Gamestudio Links
Zorro Links
Newest Posts
New Zorro version 2.30
by jcl. 08/14/20 12:48
Reducing Function Times
by txesmi. 08/14/20 12:13
2 questions
by danatrader. 08/14/20 10:05
NeoDumont's open world treadmill project
by NeoDumont. 08/13/20 23:33
Corvitextu texture browser released...
by NeoDumont. 08/13/20 23:19
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/13/20 12:00
AUM Magazine
Latest Screens
Untitled Walking Simulator
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
Who's Online Now
9 registered members (txesmi, kvm, 3run, alibaba, danatrader, Superku, AndrewAMD, Dooley, 1 invisible), 482 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Janusz, Sovattha, DonSergio, bigimpactsound, tzw101
18492 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Historical ticks for Lookback backfill #480718
07/02/20 16:42
07/02/20 16:42
Joined: Jul 2017
Posts: 488
Z
Zheka Offline OP
Senior Member
Zheka  Offline OP
Senior Member
Z

Joined: Jul 2017
Posts: 488
After observing some weirdness in backfilling LookBack data from MT4, I found out that Zorro does not always request M1 bars.

For BarPeriod=60 it requests 15min bars, for BarPeriod = 30 - 5min bars.

This does not work if BarOffset is set (which I believe was the reason to request M1 bars by default).

This is since v 2.28.xx....probably also 2.27.xx...earlier versions requested PERIOD_M1 historical candles from MT4.


Last edited by Zheka; 07/04/20 10:20.
Re: Historical ticks for Lookback backfill [Re: Zheka] #480722
07/03/20 17:19
07/03/20 17:19
Joined: Jul 2017
Posts: 488
Z
Zheka Offline OP
Senior Member
Zheka  Offline OP
Senior Member
Z

Joined: Jul 2017
Posts: 488
I have backchecked Zorro releases till 2.20 - and, indeed, for BarPeriod=60 15-min historical candles are requested from the broker, both for MT4 and IB.

This means that with BarOffset=8 and BarPeriod=60, the open-close of such hourly candles in Lookback will actually be from 8 minutes earlier (since Zorro will use a xx:00 - xx:15 candle as the last 'tick' in construction of a 60-min candle).

It becomes a nightmare to reconcile/ verify live trading performance with 're-test' for an MT4-trading system that uses historical ASK data from e.g. IB for PRELOAD, backfills BIDs from MT4 for Lookback - shifted by BarOffset,
then continues with Asks from MT4 in live.

IS there really a problem with requesting M1 ticks for Lookback? both IB and MT (at least Darwinex and Alpari) handle such requests - even voluminous - easily..


Can BarOffset ( !=0) be a flag that would switch lookback backfill requests to M1 ticks?




Last edited by Zheka; 07/04/20 10:18.
Re: Historical ticks for Lookback backfill [Re: Zheka] #480737
07/06/20 09:48
07/06/20 09:48
Joined: Jul 2000
Posts: 27,320
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,320
Frankfurt
The lookback is filled at higher resolution than one bar period, but certainly not with M1 ticks. That would cause a very slow start on long lookback periods.

I would not trade a system that is so sensitive on BarOffset that even the lookback period needs M1 ticks. But if you really need them for some reason, load them with assetHistory and PRELOAD.

Re: Historical ticks for Lookback backfill [Re: Zheka] #480742
07/06/20 11:36
07/06/20 11:36
Joined: Jul 2017
Posts: 488
Z
Zheka Offline OP
Senior Member
Zheka  Offline OP
Senior Member
Z

Joined: Jul 2017
Posts: 488
Long lookback periods causing very slow starts should use PRELOAD. But a strategy that has to be restarted after 3-4 days for some emergency reason should not fall victim of the "lowest common denominator'.

M1 ticks are needed not because BarOffset is critical for the system, but so that live and re-test performance are consistent and can be verified easily (especially in the initial period where a system is being fine-tuned before getting its full size).

Practically:

1) with BarOffset and data for half of Lookback period existing in a historical file, how will Zorro create candles for the Lookback?

Half - at exact bar periods (i.e. respecting BarOffset) - and the most recent half - with whatever is downloaded from the broker (not respecting BarOffset)?

2) Can a new flag/ variable pls be added that would force lookback backfill at the desired resolution?


Thank you!

Re: Historical ticks for Lookback backfill [Re: Zheka] #480746
07/07/20 07:04
07/07/20 07:04
Joined: Jul 2000
Posts: 27,320
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,320
Frankfurt
A candle begins at bar start plus bar offset and has the width of one bar period. A variable for setting the lookback resolution is possibly easy to implement - I'll put that on my list to check.

Re: Historical ticks for Lookback backfill [Re: jcl] #480749
07/07/20 09:11
07/07/20 09:11
Joined: Jul 2017
Posts: 488
Z
Zheka Offline OP
Senior Member
Zheka  Offline OP
Senior Member
Z

Joined: Jul 2017
Posts: 488
Originally Posted by jcl
A candle begins at bar start plus bar offset and has the width of one bar period.
This is if historical 'ticks' are granular enough and exist with timestamps at BarOffset.

But M15 bars loaded from brokers are for regular periods (xx:00-xx:15, etc).

If 1/2 of the long Lookback period exists in a historical file and is PRELOADed, and 1/2 has to be completed from a broker - how will Zorro create (BarPeriod=60; BarOffset=6) candles for the Lookback ?


Re: Historical ticks for Lookback backfill [Re: Zheka] #480750
07/07/20 13:32
07/07/20 13:32
Joined: Jul 2000
Posts: 27,320
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,320
Frankfurt
You seem to assume that bars are different dependent on preload or on granularity in the lookback period. That is not so.

How bars and candles are created is described at length in the manual: https://manual.zorro-project.com/bars.htm. It's the same for all data resolutions.

Re: Historical ticks for Lookback backfill [Re: jcl] #480759
07/08/20 09:10
07/08/20 09:10
Joined: Jul 2017
Posts: 488
Z
Zheka Offline OP
Senior Member
Zheka  Offline OP
Senior Member
Z

Joined: Jul 2017
Posts: 488

Originally Posted by jcl
You seem to assume that bars are different dependent on preload or on granularity in the lookback period.
No, I don't.

I am trying to find out how will Zorro create candles (= establish O-H-L-C prices) for the bars in the following situation:

BarOffset=6;
BarPeriod =60; // so, bars have timestamps of xx:06

LookBack=240; // 10 days

EndDate = 20200807;

set(PRELOAD);

Historical data in a t6 file (M1) exist until 2020-06-07 22:00 UTC.

Zorro will request/obtain M15 'ticks' from the broker to backfill missing recent data for the Lookback:

- 22:00 , 22:15, 22:30, 22:45, 23:00, 23:15....


What will be the O-H-L-C prices of the bars 2020-06-07 22:06 and 23:06...?

Re: Historical ticks for Lookback backfill [Re: Zheka] #480883
07/22/20 00:02
07/22/20 00:02
Joined: Jul 2017
Posts: 488
Z
Zheka Offline OP
Senior Member
Zheka  Offline OP
Senior Member
Z

Joined: Jul 2017
Posts: 488
bump..

Re: Historical ticks for Lookback backfill [Re: Zheka] #480887
07/22/20 08:26
07/22/20 08:26
Joined: Jul 2000
Posts: 27,320
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,320
Frankfurt
Hmm. It's in all details on the page that I linked. The manual is your friend - just read it.

Page 1 of 2 1 2

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1