Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Data from CSV not parsed correctly
by EternallyCurious. 04/20/24 21:39
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
folder management functions
by VoroneTZ. 04/17/24 06:52
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (howardR, AndrewAMD), 500 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Loading the options chain with additional data [Re: jcl] #468409
10/03/17 13:11
10/03/17 13:11
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
My understanding is as follows:

- each row in a 'greeks' dataset must contain contract identifier fields for expiry,strike,type
- having found the correct contract in a list of *.t8 records,
Zorro has to look up through these fields in a 'greeks' dataset to get the correct ContractRow.

Both *.t8 records and the "greeks" dataset would most probably derive from the same file with historical options data, and have similar sequences of fields - but that's not given.

So, where am I wrong and how does it actually happen?

Re: Loading the options chain with additional data [Re: Zheka] #468416
10/03/17 14:59
10/03/17 14:59
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I do not really understand what you want to do with contract identifiers in your greeks dataset. The contract identifiers must be stored in a .t8 file of CONTRACT structs, not in your greeks file. You store both datasets in same order and look up the greeks of a selected contract with the ContractRow variable that gives you the dataset row. What exactly is the problem?


Re: Loading the options chain with additional data [Re: jcl] #468426
10/03/17 21:15
10/03/17 21:15
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
I've re-read the manual one more time, but still cannot grasp how ContractRow can magically find the correct row in a separate, user-defined/freehand dataset,unless both *.t8 and *greeks* datasets have certain fields in common (besides timestamp). How?

An example of how a 'greeks' dataset can typically be structured would really help.

Re: Loading the options chain with additional data [Re: Zheka] #468429
10/04/17 07:07
10/04/17 07:07
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
dataSet(2,CurrentRow,0,Delta);
dataSet(2,CurrentRow,1,Theta);

...


Delta = dataVar(2,ContractRow,0);
Theta = dataVar(2,ContractRow,1);

Re: Loading the options chain with additional data [Re: jcl] #468460
10/05/17 15:13
10/05/17 15:13
Joined: Jul 2017
Posts: 784
Z
Zheka Offline
User
Zheka  Offline
User
Z

Joined: Jul 2017
Posts: 784
A! First getting a ContractRow and then using it to save data to the dataset!

Thanks!

I believe this should be documented, with an example of how to use it when parsing a big options data file into price/*.t8 and greeks/etc files.

Re: Loading the options chain with additional data [Re: Zheka] #468774
10/18/17 09:20
10/18/17 09:20
Joined: Sep 2017
Posts: 6
A
asdvao Offline OP
Newbie
asdvao  Offline OP
Newbie
A

Joined: Sep 2017
Posts: 6
Thanks for all the clarifications JCL, I was able to nicely connect my additional data with the T8 data, and retrieve as desired.

I'm able to access the appropriate entries with the dataVar and similar functions, but it seems that it would be useful (mainly to enhance code manageability), to retrieve the whole record within the dataset as a struct.

Say I have a struct CONTRACT_EXT, containing the definition of my record. Is it possible to retrieve the address of the dataset? If it were possible, I could do something like

CONTRACT_EXT * c = baseDatasetAddress + ContractRow;

And then access the data more intuitively, such as c->impl_vol, as opposed to using something like dataVar(2, ContractRow, 7);

Furthermore, is it somehow possible to loop thru all the contracts in a chain for the current bar date?

Re: Loading the options chain with additional data [Re: asdvao] #468775
10/18/17 10:31
10/18/17 10:31
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Yes, dataStr delivers the pointer to the record.

CONTRACT_EXT * c = dataStr(Handle,ContractRow,0);

Page 3 of 3 1 2 3

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1