Gamestudio Links
Zorro Links
Newest Posts
What are you working on?
by Emre
Today at 01:03
New Zorro version 1.83
by claudio
Yesterday at 17:22
Ahead bias when retrain
by jcl
Yesterday at 12:27
Huge array for Deep Learning
by jcl
Yesterday at 12:06
[LBGUI] Memory not released!
by EVO
05/23/18 22:39
http_post undeclared identifier
by Superku
05/23/18 22:10
Pan/Tilt in relation to entity?
by Superku
05/23/18 20:59
AUM Magazine
Latest Screens
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Triton Wing now available on Steam
Who's Online
8 registered (Slin, Quad, Superku, AndrewAMD, 3run, jyd, 2 invisible), 460 Guests and 3 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Rayharry, AgentShark, rpauletto, tuuPaul, LaserJock2000
17960 Registered Users
Page 2 of 3 < 1 2 3 >
Topic Options
Rate This Topic
#470959 - 02/14/18 13:39 Re: Get a csv file into an array of structs, confused about lite-c [Re: easyX]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26338
Loc: Frankfurt
I think I see now the problem. The timestamp has a "," between date and time, but the "," is a delimiter. That's why the parser does not work.

It should be relatively easy to fix that on the parser side. When you can wait for the next beta release, we'll include the fix there.



Top
#470961 - 02/14/18 13:56 Re: Get a csv file into an array of structs, confused about lite-c [Re: jcl]
easyX Offline
Newbie

Registered: 11/29/17
Posts: 39
Loc: Germany
Ok great, thanks a lot.

Top
#471081 - 02/19/18 00:16 Re: Get a csv file into an array of structs, confused about lite-c [Re: easyX]
easyX Offline
Newbie

Registered: 11/29/17
Posts: 39
Loc: Germany
Ok it is working now, also the download from Oanda, thank you very much!

Coming to another problem, i just realised that my external data for forex (asirikuy) is using GMT+1/+2 with european dst.

What are my options to work with this data? Can i parse it somehow and store the UTC times? Or do i have to set an offset in my scripts using this data?

Top
#471087 - 02/19/18 09:41 Re: Get a csv file into an array of structs, confused about lite-c [Re: easyX]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26338
Loc: Frankfurt
Both is possible, but the normal way is converting it. It's a bit tricky because it has not a constant distance to UTC. For determining if a time T is DST or not, use

Now = T;
if(dst(NOW)) ...

Top
#471301 - 02/27/18 13:09 Re: Get a csv file into an array of structs, confused about lite-c [Re: jcl]
easyX Offline
Newbie

Registered: 11/29/17
Posts: 39
Loc: Germany
Just to understand it, does Zorro uses timestamps of the historic data always as UTC? Could i work with offsets in this case? (1 or 2h depending on dst) to get the "real" UTC time from my data? Or is it best to convert it?

The problem seems to be be that the data back in old history is shifted even more, so somewhere between there was a change.

How long is a trade week? Always 5*24h (in forex) or did it change over the year(s)? If so it would be possible to find the shift (by looking at first and last bar of a week)

Top
#471343 - 02/28/18 15:24 Re: Get a csv file into an array of structs, confused about lite-c [Re: easyX]
jcl Offline

Chief Engineer

Registered: 07/22/00
Posts: 26338
Loc: Frankfurt
Yes, timestamps are supposed to be UTC. So you must correct them if they are local time. It does not matter much for daily data, but it matters for intraday data.

Top
#471361 - 03/01/18 06:59 Re: Get a csv file into an array of structs, confused about lite-c [Re: easyX]
luisd Offline
Newbie

Registered: 01/19/18
Posts: 29
Originally Posted By: easyX
The problem seems to be be that the data back in old history is shifted even more, so somewhere between there was a change.

How long is a trade week? Always 5*24h (in forex) or did it change over the year(s)? If so it would be possible to find the shift (by looking at first and last bar of a week)


Use the CME forex futures trading hours for reference.
The CFD from FXCM and other brokers align to the CME hours
Forex hours use DST.

Top
#471367 - 03/01/18 12:16 Re: Get a csv file into an array of structs, confused about lite-c [Re: luisd]
easyX Offline
Newbie

Registered: 11/29/17
Posts: 39
Loc: Germany
But how to get the historic trading hours of the CME forex future?

The problem is that not everywhere in the World they have DST (Japan) or it's slightly different (US compared to EU). So if you need to be sure where in the timeline you are ist very complex and a big mess.

As a simple example .. market open times of all different markets at any time at least since 2002.

First there was a rule change back in 2007 for US DST. Then Japan has no DST. Australia is on the southern hemisphere. So many factors you have to think of. I never found a working indicator e.g. in mt4 who tought about all this and had no mistakes! It seems Zorro so far has the most advanced DST handling.

But stil i somehow have to get my CET backtest data into UTC, even though the data seems not to be 100% consistent with timezone, i think older data is different. My idea is to analyse it week by week, checking if there is data for 5*24h, if so shift itthat it starts 23:00 sunday, but sometimes there is 1h missing, have to see if it's always the first after the weekend then it would be ok (but still not nice that it's missing).

Biggest problem for me is that i am still a big noob in c litec, handling with files for me is very difficult, never did that before at all.


Edited by easyX (03/01/18 12:17)

Top
#471431 - 03/03/18 18:37 Re: Get a csv file into an array of structs, confused about lite-c [Re: easyX]
luisd Offline
Newbie

Registered: 01/19/18
Posts: 29
So you should use the Chicago DST.

That may not switch on and off in perfect sync with the CET DST. You are right here. That's the only point I have not verified.

To recap:
- if you want 'official' daily bars use the Futures FX opening time.

- best and simplest: download directly daily bars (already aggregated) from FXCM and use them as a separate time-series to work with your intraday bars.

- if you want to aggregate with Zorro, it's slightly more complex and the
results will not as perfect. Use CET 23H00 as the end of the day and aggregated with TimeFrame as shown in the example.

- usually around midnite CET volatility is low and differences are not huge.

Top
#471504 - 03/06/18 23:37 Re: Get a csv file into an array of structs, confused about lite-c [Re: luisd]
easyX Offline
Newbie

Registered: 11/29/17
Posts: 39
Loc: Germany
Ok i figured out that my Data is 100% GMT+1/+2 (central european time)

This was made sure by checking for the regular NFP news, it's easy to find/visible and always at the same time.

So now knowing this i want to convert my data to UTC for Zorro.

How can i add/subtract 1 hour from a time? I also don't really understand Now and NOW why do i need this? can't find any examples how to use this.. frown (i need clear examples to understand/copy something i haven't done yet, even though its basic)

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