Gamestudio Links
Zorro Links
Newest Posts
Get BMAP's filename...?
by Firoball
6 minutes 38 seconds ago
bone ang/pos
by 3run
Today at 15:41
Takeprofit and Stoploss
by sdelatorre
Today at 10:54
Save as .wmb
by Emre
Today at 05:57
Connors RSI implementation
by MatPed
Today at 00:37
multiple results graph in multi-asset scripts?
by SBGuy
Yesterday at 21:19
Verbose messages
by Sphin
Yesterday at 20:24
AUM Magazine
Latest Screens
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Forgotten Tales - Demo version
RPG PARTY
Who's Online
13 registered (ChrstphFr, JRA, mig, AndrewAMD, MatPed, 3run, jyd, krial057, alibaba, 1 invisible), 477 Guests and 4 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
bbn1982, selma, mbullied, Raisinbran, Grodt
17984 Registered Users
Topic Options
Rate This Topic
#473093 - 06/13/18 00:24 iVolatility options csv file to .t8 Zorro file
SBGuy Offline
Newbie

Registered: 05/27/18
Posts: 25
So, I decided to buy some real options data from iVolatility for my options backtesting.

However, there's no Zorro script for converting CSV to .t8 file. Anyone care to share a few lines of code on how I might do this?

CSVtoHistory only produces .t6 files.

Thanks.

Top
#473094 - 06/13/18 02:32 Re: iVolatility options csv file to .t8 Zorro file [Re: SBGuy]
AndrewAMD Online
Senior Member

Registered: 02/21/17
Posts: 313
Loc: Chicago
The manual is your friend! laugh

You can parse CSV to t8:
http://zorro-project.com/manual/en/data.htm

CSVtoHistory is a great template. So modify it to suit your needs.

Other resources:
http://zorro-project.com/manual/en/file_.htm
http://zorro-project.com/manual/en/str_.htm

Top
#473106 - 06/14/18 01:05 Re: iVolatility options csv file to .t8 Zorro file [Re: AndrewAMD]
SBGuy Offline
Newbie

Registered: 05/27/18
Posts: 25
Well, I have been going to my friendly manual before posting for help. However, it is not being cooperative, or I'm still very rusty with coding.

Anyhow, I successfully made a T8 file, verified with History.c, but only after manually changing the format of the Expiration Date field in the CSV file using Excel. Trying to be less of a hacker, I would like to massage that field in my Zorro script.

The problem is that the Expiration Date string appears as 3/24/2017, where the month and day is sometimes 1 or 2 chars. I need to transpose this into an 8 digit long - YYYYMMDD, which is what the t8 file format requires.

I'm been hacking with strdate, wdatef, ymd, strf, etc. all day and can't seem to get to YYYYMMDD.

How would you do this Master Andrew? I'm sure you probably have a 1 liner for this problem :-)

Many thanks!



Edited by SBGuy (06/14/18 01:06)

Top
#473108 - 06/14/18 01:27 Re: iVolatility options csv file to .t8 Zorro file [Re: SBGuy]
SBGuy Offline
Newbie

Registered: 05/27/18
Posts: 25
Wait.... Here is the solution!

ymd(wdatef("%m/%d/%Y",MyDate)

I'm going to post the full script when I'm done. No one should have to spend this much time writing a damn CSV import script, when whe should be spending time making money! :-)

Top
#473109 - 06/14/18 01:31 Re: iVolatility options csv file to .t8 Zorro file [Re: SBGuy]
AndrewAMD Online
Senior Member

Registered: 02/21/17
Posts: 313
Loc: Chicago
Yay! laugh

Top
#473131 - 06/15/18 18:07 Re: iVolatility options csv file to .t8 Zorro file [Re: AndrewAMD]
SBGuy Offline
Newbie

Registered: 05/27/18
Posts: 25
I had some help from the guys at oP and they will post the final script on the manual. There were a lot of nuances that were not well documented when it comes to .t8 files.

Top



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

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