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
2 registered members (AndrewAMD, VoroneTZ), 827 guests, and 5 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
AssetHistory () for contracts #474228
10/01/18 14:33
10/01/18 14:33
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
JCL,

it would be great if AssetHistory/BrokerHistory2 could recognize that the input symbol is a "contract" and in such cases accept and fill a *t8 struct instead of *t6.

Is this something you will consider implementing?

Re: AssetHistory () for contracts [Re: Zheka] #474232
10/01/18 15:31
10/01/18 15:31
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Not only that, you'll be declared a Zorro hero when you can lead us to a broker that has options contract history for download.

Re: AssetHistory () for contracts [Re: jcl] #474238
10/01/18 17:19
10/01/18 17:19
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
IB maintains contract's history, supposedly- until option expiration.
Practically, I can download 1-1.5 months of history for weeklies/monthlies. I did not try Quarterlies' or longer term to see if it indeed covers the full duration of a contract.
Even if it is only 1.5 month or less, one can build a database over time.

However, to store it properly, one needs to manually convert the received dataset from t6 to t8. Also, IB plug-in does not currently allow to SET_MARKETVAL to obtain historical spread.
(And it is slow - see my IB-plug-in wish list in another thread)

Hence my request.

semi-Hero? tongue

Re: AssetHistory () for contracts [Re: Zheka] #474252
10/02/18 08:05
10/02/18 08:05
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Ok, semi-hero when it's for live contracts only. But t8 files are for options chains, so they cannot be generated with a single contract symbol. For a t8 file, write a script that first downloads histories for all contracts in the chain, then retrieves strike and expiration from the file names and puts all downloaded t1 or t6 files together to a single t8 file.

Re: AssetHistory () for contracts [Re: jcl] #474255
10/02/18 11:20
10/02/18 11:20
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
Sure.
What I ask for is that assetHistory() recognizes that the input symbol is an OPT/FOP, gets an expiry and a strike from the symbol name and fills in and returns a *T8, rather than a *T6.

(A programmer would then cycle through the strikes for a single contract, append the datasets and dataSort(); then repeat for other expiries, as desired).

Re: AssetHistory () for contracts [Re: Zheka] #474256
10/02/18 11:25
10/02/18 11:25
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
I see no real use of this feature. You already have expiry and strike available in the script that does the downloads and generates the final t8 file. What difference does it make when it reads the prices out of t8 instead of t6 files?

Re: AssetHistory () for contracts [Re: jcl] #474261
10/02/18 12:58
10/02/18 12:58
Joined: Jul 2017
Posts: 783
Z
Zheka Offline OP
User
Zheka  Offline OP
User
Z

Joined: Jul 2017
Posts: 783
assetHistory() with a VOLATILE flag returns a handle to the downloaded dataset.

The end user would just do a dataAppend(1,ii) in a cycle (of strikes) and dataSort(1) afterwards, instead of having to manually go through each T6 struct and writing to a T8 struct (before appending).

Efficiency and elegance.

Re: AssetHistory () for contracts [Re: Zheka] #474262
10/02/18 14:10
10/02/18 14:10
Joined: Jul 2000
Posts: 27,977
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,977
Frankfurt
Same with t6:

CONTRACT* C = dataAppendRow(MyT8Handle,9);

then fill the contract from the current T6 dataset.

New functions make sense when they save the user some work, like 20-30 script lines, but not 2-3 lines. But if any questions come up with that script, just ask.


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