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
5 registered members (TipmyPip, AndrewAMD, Quad, aliswee, degenerate_762), 970 guests, and 4 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
BrokerHistory2 - nTicks more than 1? #480977
07/28/20 20:19
07/28/20 20:19
Joined: Jan 2014
Posts: 86
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 86
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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: 86
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 86
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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: 86
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 86
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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: 86
London City
B
byakuren81 Offline OP
Junior Member
byakuren81  Offline OP
Junior Member
B

Joined: Jan 2014
Posts: 86
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