Gamestudio Links
Zorro Links
Newest Posts
New Zorro version 2.30
by Zheka. 08/03/20 15:24
script CurrencyStrength
by jcl. 08/03/20 14:01
Moving Panels together
by Aku_Aku. 08/03/20 12:22
Why gamestudio USE Lite_C
by txesmi. 08/03/20 11:49
Price clusters
by jcl. 08/03/20 10:04
Zorro.exe return codes
by jcl. 08/03/20 09:41
objective - based to DD
by Grat. 08/03/20 05:14
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
9 registered members (txesmi, AndrewAMD, Jerome8911, exile, Dooley, Zheka, danatrader, hast29, kvm), 467 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Al82, Alibert, jsch, daan, TianYu
18487 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
BrokerHistory2 - nTicks more than 1? #480977
07/28/20 20:19
07/28/20 20:19
Joined: Jan 2014
Posts: 67
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 67
London City
Hello, I am writing a plugin for IQFeed and I would like to know if it is possible to set the parameter nTicks of the function BrokerHistory to more than one when being called by assetHistory. My implementation works but it is very slow to fill the database with years of minute data as BrokerHistory2 is called for every single minute...

Re: BrokerHistory2 - nTicks more than 1? [Re: byakuren81] #480978
07/28/20 20:26
07/28/20 20:26
Joined: Feb 2017
Posts: 1,062
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,062
Chicago
Zorro automatically calls the GET_MAXTICKS broker command to size its tick buffer. If you support the command, nTicks will be equal to the output of the command.

Re: BrokerHistory2 - nTicks more than 1? [Re: byakuren81] #481013
08/01/20 15:10
08/01/20 15:10
Joined: Jan 2014
Posts: 67
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 67
London City
When returning 1000 from BrokerCommand for GET_MAXTICKS, I can get 900 ticks from BrokerHistory2 in one call, but it crashes when trying to get 1000. Clearly the tick buffer has not been sized with 1000 or something unexplained in the manual is going on...
FYI I counted the number of ticks it could process to guess the tick buffer size and I got different results before crashing for different call to Download like 943 or 956.

Last edited by byakuren81; 08/01/20 15:25.
Re: BrokerHistory2 - nTicks more than 1? [Re: byakuren81] #481015
08/01/20 15:18
08/01/20 15:18
Joined: Feb 2017
Posts: 1,062
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,062
Chicago
Does nTicks change to 1000 when GET_MAXTICKS returns 1000?

Also, did you configure your DLL's struct alignment correctly per the Zorro manual?

Re: BrokerHistory2 - nTicks more than 1? [Re: AndrewAMD] #481016
08/01/20 15:31
08/01/20 15:31
Joined: Jan 2014
Posts: 67
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 67
London City
nTicks remains constant equal to 1. I did not configure my DLL struct alignment, I missed that point in the manual, sorry my bad.
I just made sure under VisualStudio this alignment was set to 1 or 4 bytes but it did not change anything. I still get nTicks=1 even if BrokerCommand returns 1000 in ther case of GET_MAXTICKS.

Last edited by byakuren81; 08/01/20 15:43.
Re: BrokerHistory2 - nTicks more than 1? [Re: byakuren81] #481017
08/01/20 15:48
08/01/20 15:48
Joined: Feb 2017
Posts: 1,062
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,062
Chicago
Definitely adjust the struct alignment.

Something else is not right here.

How exactly are you causing BrokerHistory2 to be invoked?

Also, are you 100% sure BrokerCommand is returning 1000 for GET_MAXTICKS? Verify this from a Zorro script.

Re: BrokerHistory2 - nTicks more than 1? [Re: AndrewAMD] #481018
08/01/20 16:15
08/01/20 16:15
Joined: Jan 2014
Posts: 67
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 67
London City
You are absolutely right, something was wrong with my implementation of BrokerCommand, now I get nTicks=1000.
Thanks a lot for your time and your help.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1