BrokerHistory2: Increase Ticks to 17,000 or higher

Posted By: AndrewAMD

BrokerHistory2: Increase Ticks to 17,000 or higher - 10/09/17 17:57

Hello,

I decided to start a new thread before I derail the other one further.

Executive summary:
* I would like the maximum allowable ticks per BrokerHistory2 call to be increased from 300 ticks to 17,000 ticks or higher.

Rationale:
* The Ally Invest API allows my plugin to download up to two months of historical data for a single asset with a single request, whether I use XML or JSON. (JSON is faster, but I did not implement it yet.)
* NYSE hours are 9:30 am to 4:00 pm, 6.5 hours per day.
* 2 months of data is about 16,900 or so ticks. We can round up to 17,000.
* Ally limits requests to 60 per minute. With this approach, I cannot run out of requests if I am too busy getting data.
* Finally, if I use the below test script, the 1 month and 2 month data grabs work, and the 3-month fails.
Posted By: AndrewAMD

Re: BrokerHistory2: Increase Ticks - 10/09/17 18:38

Attached is the script and its outputs.


Attached picture Capture.JPG
Attached File
AllyTester006.c  (262 downloads)
Attached File
AllyTester006_outputs.zip  (210 downloads)
Posted By: jcl

Re: BrokerHistory2: Increase Ticks - 10/10/17 06:19

We will probably implement a brokerCommand call for setting the size. You can then set a million ticks if you wanted.
Posted By: AndrewAMD

Re: BrokerHistory2: Increase Ticks - 10/10/17 11:09

This would be good. I look forward to it.
Posted By: TipmyPip

Re: BrokerHistory2: Increase Ticks - 01/04/18 11:27

Thank you, This would be great for long term strategies.
Posted By: AndrewAMD

Re: BrokerHistory2: Increase Ticks - 01/05/18 03:49

Originally Posted By: TipmyPip
Thank you, This would be great for long term strategies.
Strategies should not be afftected by this feature. But it may or may not improve how quickly a given plugin can download historical data. It’ll certainly help with both of my plugins! laugh
© 2024 lite-C Forums