Gamestudio Links
Zorro Links
Newest Posts
Series within loop
by Spirit
Today at 03:38
ein Truetype wie ein Bitmap Font laden?
by tagimbul
Yesterday at 21:46
'you' and c_scan
by 3run
Yesterday at 17:24
rayp's old school fast zombie FPS project
by 3run
Yesterday at 11:01
No Trades Using Workshop 6
by peterhw
Yesterday at 10:59
Actual PIP Cost for backtesting
by tradingest
10/14/18 16:36
Rigid Force Alpha - Classic side-scrolling shoot'em up
by Turrican
10/14/18 11:44
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
5 registered (kvm, Ayumi, jenGs, PSA, jumpman), 463 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
BazGen, pallab1964, wOrlD21, peterhw, 7th_zorro
18076 Registered Users
Page 2 of 3 < 1 2 3 >
Topic Options
Rate This Topic
#470409 - 01/12/18 14:13 Re: Market hours for Globex [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: 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.

Top
#470414 - 01/12/18 18:18 Re: Market hours for Globex [Re: jcl]
Zheka Offline
Senior Member

Registered: 07/03/17
Posts: 326
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).


Attachments
Zorro_1m_SW2115EW2100_160513-15.PNG (4 downloads)


Top
#470442 - 01/15/18 10:36 Re: Market hours for Globex [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: 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.

Top
#470471 - 01/16/18 17:12 Re: Market hours for Globex [Re: jcl]
Zheka Offline
Senior Member

Registered: 07/03/17
Posts: 326
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.

Top
#470482 - 01/17/18 11:23 Re: Market hours for Globex [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: 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?

Top
#470487 - 01/17/18 14:09 Re: Market hours for Globex [Re: jcl]
Zheka Offline
Senior Member

Registered: 07/03/17
Posts: 326
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?

Top
#470489 - 01/17/18 14:39 Re: Market hours for Globex [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: 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.

Top
#470494 - 01/17/18 16:02 Re: Market hours for Globex [Re: jcl]
Zheka Offline
Senior Member

Registered: 07/03/17
Posts: 326
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.

Top
#470498 - 01/17/18 16:46 Re: Market hours for Globex [Re: Zheka]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26529
Loc: 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);

Top
#470511 - 01/17/18 19:10 Re: Market hours for Globex [Re: jcl]
Zheka Offline
Senior Member

Registered: 07/03/17
Posts: 326
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.

Top
Page 2 of 3 < 1 2 3 >



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

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