Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
5 registered members (Nymphodora, AndrewAMD, TipmyPip, Quad, Imhotep), 847 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 3 1 2 3
Re: Market hours for Globex [Re: Zheka] #470409
01/12/18 13:13
01/12/18 13:13
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I suppose because there are no prices before 2201. Check that with the history editor from the download page. If it has prices at 2115, you should normally be able to start the week at 2115. But if not, you can upload the historical data here and I'll look into the problem.

Re: Market hours for Globex [Re: jcl] #470414
01/12/18 17:18
01/12/18 17:18
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
I am copy-pasting from the message above.
There are bars from 21:15

Weekend=1
Quote:
Quote:
[1868: Fri 16-05-13 20:56] (122.82)n FrameOffset: 0, timeFrame=1 ET Time=1656, O= 122.80200, C= 122.82400

[1869: Fri 16-05-13 21:01] (122.99)n FrameOffset: 0, timeFrame=1 ET Time=1701, O= 122.82400, C= 122.98700

[1870: Sun 16-05-15 21:21] (122.85)n FrameOffset: 0, timeFrame=1 ET Time=1721, O= 122.94500, C= 122.84800

[1871: Sun 16-05-15 21:26] (122.86)n FrameOffset: 0, timeFrame=1 ET Time=1726, O= 122.86400, C= 122.86400

and this - with Weekend=2;

Quote:
[1858: Fri 16-05-13 20:51] (122.80)n FrameOffset: 0, timeFrame=1 ET Time=1651, O= 122.80300, C= 122.80200

[1859: Fri 16-05-13 20:56] (122.82)n FrameOffset: 0, timeFrame=1 ET Time=1656, O= 122.80200, C= 122.82400

[1860: Sun 16-05-15 22:01] (122.87)n FrameOffset: 0, timeFrame=1 ET Time=1801, O= 122.82400, C= 122.87300

[1861: Sun 16-05-15 22:06] (122.85)n FrameOffset: 0, timeFrame=1 ET Time=1806, O= 122.84600, C= 122.84700


Attached is also a screenshot from the history editor (look at top-right box).

Attached Files
Re: Market hours for Globex [Re: Zheka] #470442
01/15/18 09:36
01/15/18 09:36
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Thanks! If missing prices are not the reason, then it's possibly some limit to the earliest week start. I'll inquire. - Update: I learned the weekend has indeed a 2 days 'core' from Friday 22:00 til Sunday 22:00. It can be made longer, but not shorter than those 2 days. And yes, this limit can be probably removed in a future version. Setting up the weekend is the user's responsibility, so there's no real reason for a limit.

Re: Market hours for Globex [Re: jcl] #470471
01/16/18 16:12
01/16/18 16:12
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
OK. Similarly, there is no obvious reason for rounding off this settings to an hour; it should be at user's discretion.

Let's now fast forward our discussion to the "skipped bars"/ frame constructions.

Re: Market hours for Globex [Re: Zheka] #470482
01/17/18 10:23
01/17/18 10:23
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
>>- Skipping bars only works when TF=1(BarPeriod).
Higher TF do not work in practice<<

It's the other way around: TF = 1 does not skip bars, you need TF != 1 for skipping bars.

>>- there is a key bug with frame formation.
Open/highs/lows of skipped bars are not really skipped, still counted in the veeery long TF. <<

That's the very purpose of a time frame. What exactly is the problem?

Re: Market hours for Globex [Re: jcl] #470487
01/17/18 13:09
01/17/18 13:09
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Quote:
Skipping bars only works when TF=1(BarPeriod). Higher TF do not work in practice

If BarPeriod=5 and desired trading TF is 20min (i.e. TF=4), then outside of "market hours":
- bars are skipped with TF=0,
- TF set to -N at start of a new frame, and then....
-...TF is to be set to what value?

Or do you suggest to construct each and every frame manually by checking the time?

Quote:
Open/highs/lows of skipped bars are not really skipped, still counted in the veeery long TF. - That's the very purpose of a time frame

I want to trade during "market hours" and I want to use a series of bars/frames that will ONLY contain information from that period.

I do not want to include in such a 20-min series an irregular, oversized frame that covers the "overnight/overweekend" period.

Is that a fair paradigm and expectation?

Re: Market hours for Globex [Re: Zheka] #470489
01/17/18 13:39
01/17/18 13:39
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
>>-...TF is to be set to what value?

For skipping 4 bars, have you tried the value 4?

>>I want to trade during "market hours" and I want to use a series of bars/frames that will ONLY contain information from that period.<<

What are you then doing with timeframes? If you only want to completely ignore bars outside market hours, then simply do not use their prices for your indicators and do not trade at that time.

Maybe the problem is some misconception of bars and time frames. I do not know what you want to achieve, but when you explain in more detail when and under what conditions you want to enter which trades, I can probably help better.

Re: Market hours for Globex [Re: jcl] #470494
01/17/18 15:02
01/17/18 15:02
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Quote:
..TF is to be set to what value? For skipping 4 bars, how about the value 4?

Setting TF=4 will not produce correct frames - because TF just counts bars and lands at each TFx bar , regardless if it has been skipped or not.
So, for a Globex session ending 17:00 ET and starting 18:00 ET.
Quote:
[848: Wed 16-05-11 20:21] (123.91)
[849: Wed 16-05-11 20:26] (123.91)
[850: Wed 16-05-11 20:31] (123.88)
[851: Wed 16-05-11 20:36] (123.89)n FrameOffset: 3, timeFrame=4 ET Time=1636, O= 123.87600, C= 123.89500

[852: Wed 16-05-11 20:41] (123.91)
[853: Wed 16-05-11 20:46] (123.94)
[854: Wed 16-05-11 20:51] (123.94)
[855: Wed 16-05-11 20:56] (123.88)n FrameOffset: 3, timeFrame=4 ET Time=1656, O= 123.89500, C= 123.87600

[856: Wed 16-05-11 21:01] (123.90) Skiping.. Time= 1701, skipBars= -1

[857: Wed 16-05-11 21:16] (123.87) Skiping.. Time= 1716, skipBars= -2

[858: Wed 16-05-11 21:21] (123.93) Skiping.. Time= 1721, skipBars= -3

[859: Wed 16-05-11 21:26] (123.88) Skiping.. Time= 1726, skipBars= -4

[860: Wed 16-05-11 21:31] (123.92) Skiping.. Time= 1731, skipBars= -5

[861: Wed 16-05-11 21:36] (123.93) Skiping.. Time= 1736, skipBars= -6

[862: Wed 16-05-11 21:41] (123.90) Skiping.. Time= 1741, skipBars= -7

[863: Wed 16-05-11 21:46] (123.91) Skiping.. Time= 1746, skipBars= -8

[864: Wed 16-05-11 21:51] (123.91) Skiping.. Time= 1751, skipBars= -9

[865: Wed 16-05-11 21:56] (123.91) Skiping.. Time= 1756, skipBars= -10

[866: Wed 16-05-11 22:01] (123.94)n FrameOffset: 3, timeFrame=-10 ET Time=1801, O= 123.87600, C= 123.93900

[867: Wed 16-05-11 22:06] (123.92)n FrameOffset: 3, timeFrame=4 ET Time=1806, O= 123.91100, C= 123.92100

[868: Wed 16-05-11 22:11] (123.92)
[869: Wed 16-05-11 22:16] (123.93)
[870: Wed 16-05-11 22:21] (123.93)
[871: Wed 16-05-11 22:26] (123.92)n FrameOffset: 3, timeFrame=4 ET Time=1826, O= 123.92100, C= 123.92400

And no amount of tinkering will solve this with a current built-in mechanism.

Quote:
If you only want to completely ignore bars outside market hours, then simply do not use their prices for your indicators

Yes, I want to completely ignore prices outside market hours.
How can I construct a series of 20min bars(or frames) that would ONLY contain prices within the defined "session"?

In general, ALL other software I worked with -TS,MC,NT,SC,WL,MT5- have "sessions" as a basic concept ( most- per day), and bar construction is governed by session start/end settings.
Porting working, tested systems to Zorro, I would like to achieve 100% consistency.

Re: Market hours for Globex [Re: Zheka] #470498
01/17/18 15:46
01/17/18 15:46
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
For a series of prices only within market hours, just fill a static series only within market hours.

vars Prices = series(0,-100);
if(market(...)) shift(Prices,priceClose(),100);

Re: Market hours for Globex [Re: jcl] #470511
01/17/18 18:10
01/17/18 18:10
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
It just hit me that Skipped bars define the start of the frame! It is not at all necessary to set TF=Skipped bars after skipping bars - as one is conditioned by the manual.
You can set it to the number of bars(negative) back you really need the frame to span and that would only merge that number of bars! Urahh!

This explanation should be added to the manual!

One more question re bar() function:
- can you please give an example in the manual how Start and Time fields can be used?
- is it possible to add a return option that would "not start a bar"

Thank you.

Page 2 of 3 1 2 3

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