|
Re: New Zorro version 1.96
[Re: jcl]
#475093
11/22/18 20:20
11/22/18 20:20
|
Joined: Sep 2017
Posts: 235
Hredot
Member
|
Member
Joined: Sep 2017
Posts: 235
|
I got the newest version of IB Gateway, necessary Asset subscriptions with IB are in place. Moreover, Multicharts .net downloads the prices from that same IB Gateway just fine. I invite you to take your favorite asset list and see for yourself:
function run()
{
NumYears = 10;
assetList("History\AssetsMinutes.csv"); // load asset list
while(loop(Assets))
assetHistory(Loop1,1);
quit();
}
Seems to be a problem with Zorro after all.
|
|
|
Re: New Zorro version 1.96
[Re: jcl]
#475109
11/23/18 14:03
11/23/18 14:03
|
Joined: Jul 2017
Posts: 784
Zheka
User
|
User
Joined: Jul 2017
Posts: 784
|
The script works on my side, at least with FX pairs. What symbols cause problems? @JCL, Why would this script not work with IB? Do you mean it will be slow to load data? Probably, but why would it crash? Here are 2 subsequent requests to the API when I just tested the script: 2018-11-23 07:56:45.805 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:DET] ReqHistoricalData(20)::[version=6,ID=418,action=null,reqDesc=Symbol=AUD Type=CASH Expiry=null Strike=0.0 Put/Call=? Exchange=IDEALPRO CompExch=null Currency=USD Multiplier=null IbLocalSymbol=null IbTradingClass=null SecIdType=null SecId=null includeExpired=false needLeadFutureMonth=false needContinuousLeadFutureOnly=false newsSource=null Legs=null Special Info=null,endDateTimeStr=20101215 07:00:30GMT,backfillDuration=2 D ,whatToShow=4,barSizeSettingStr=1 min,formatDate=2,combo=null] ..................... 2018-11-23 07:56:47.024 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:INFO] Handling incoming UnSet(0) message. 2018-11-23 07:56:47.024 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:ERR] Invalid incoming request type - 0 2018-11-23 07:56:49.045 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:INFO] Handling incoming UnSet(0) message. 2018-11-23 07:56:49.045 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:ERR] Invalid incoming request type - 0 2018-11-23 07:56:51.014 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:INFO] Handling incoming UnSet(0) message. 2018-11-23 07:56:51.014 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:ERR] Invalid incoming request type - 0 2018-11-23 07:56:53.031 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:INFO] Handling incoming UnSet(0) message. 2018-11-23 07:56:53.031 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:ERR] Invalid incoming request type - 0 2018-11-23 07:56:55.000 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:INFO] Handling incoming UnSet(0) message. 2018-11-23 07:56:55.000 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:ERR] Invalid incoming request type - 0 2018-11-23 07:56:57.016 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:INFO] Handling incoming UnSet(0) message. 2018-11-23 07:56:57.016 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:ERR] Invalid incoming request type - 0 ................................... 2018-11-23 07:56:58.172 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:DET] ReqHistoricalData(20)::[version=6,ID=419,action=null,reqDesc=Symbol=AUD Type=CASH Expiry=null Strike=0.0 Put/Call=? Exchange=IDEALPRO CompExch=null Currency=USD Multiplier=null IbLocalSymbol=null IbTradingClass=null SecIdType=null SecId=null includeExpired=false needLeadFutureMonth=false needContinuousLeadFutureOnly=false newsSource=null Legs=null Special Info=null,endDateTimeStr=20101214 15:45:30 GMT,backfillDuration=2 D,whatToShow=4,barSizeSettingStr=1 min,formatDate=2,combo=null]
2018-11-23 07:56:59.360 [QF] INFO [JTS-EServerSocket-948] - [1:63:76:1:0:0:0:DET] ReqHistoricalData(20)::[version=6,ID=420,action=null,reqDesc=Symbol=AUD Type=CASH Expiry=null Strike=0.0 Put/Call=? Exchange=IDEALPRO CompExch=null Currency=USD Multiplier=null IbLocalSymbol=null IbTradingClass=null SecIdType=null SecId=null includeExpired=false needLeadFutureMonth=false needContinuousLeadFutureOnly=false newsSource=null Legs=null Special Info=null,endDateTimeStr=20101214 00:45:30 GMT,backfillDuration=2 D,whatToShow=4,barSizeSettingStr=1 min,formatDate=2,combo=null] And this is how MC requests same data from IB: 2018-11-23 08:40:46.031 [QF] INFO [JTS-EServerSocket-1017] - [31116:139:139:1:0:0:0:DET] ReqHistoricalData(20)::[version=139,ID=1000005,action=null,reqDesc=Symbol=AUD.USD Type=CASH Expiry=null Strike=0.0 Put/Call=? Exchange=IDEALPRO CompExch=null Currency=USD Multiplier=null IbLocalSymbol=null IbTradingClass=null SecIdType=null SecId=null includeExpired=false needLeadFutureMonth=false needContinuousLeadFutureOnly=false newsSource=null Legs=null Special Info=null,endDateTimeStr=20181108 22:00:00 UTC,backfillDuration=5D, whatToShow=4,barSizeSettingStr=1 min,formatDate=2,combo=null] ....... 2018-11-23 08:40:47.172 [QF] INFO [JTS-EServerSocket-1017] - [31116:139:139:1:0:0:0:DET] ReqHistoricalData(20)::[version=139,ID=1000007,action=null,reqDesc=Symbol=AUD.USD Type=CASH Expiry=null Strike=0.0 Put/Call=? Exchange=IDEALPRO CompExch=null Currency=USD Multiplier=null IbLocalSymbol=null IbTradingClass=null SecIdType=null SecId=null includeExpired=false needLeadFutureMonth=false needContinuousLeadFutureOnly=false newsSource=null Legs=null Special Info=null,endDateTimeStr=20181101 21:00:00 UTC,backfillDuration=5 D, whatToShow=4,barSizeSettingStr=1 min,formatDate=2,combo=null] No erroneous requests taking full 10sec and EndDateTime is calculated properly. It took Zorro 14-15+ sec to download 1 day of data (in 3 requests), while it took MC 1 sec to download 5. So much for "slow" IB API.
|
|
|
Re: New Zorro version 1.96
[Re: jcl]
#475116
11/23/18 15:08
11/23/18 15:08
|
Joined: Jul 2017
Posts: 784
Zheka
User
|
User
Joined: Jul 2017
Posts: 784
|
too many assets in the list.. we still implement a "soft" slow to load-balance client requests vs. server response Pacing of requests is exactly the job of a plug-in, cannot be the user's script. Though as of TWS/IBG v974 IB API - finally! - implements automatic pacing. Better Pacing: API messages sent at a higher rate than 50/second can now be paced by TWS at the 50/second rate instead of potentially causing a disconnection. This is now done automatically by the RTD Server API and can be done with other API technologies by invoking SetConnectOptions("+PACEAPI") prior to eConnect. https://www.interactivebrokers.com/en/index.php?f=5061This has been tested by some people at IBAPI forum and it does work, allowing to update prices for an option chain of 1860 contracts in under 40sec. Requesting too much historical data can lead to throttling and eventual disconnect of the API client. And as is clear from the logs above, Zorro's IB plug-in is grossly inefficient at determining how much to request in one go (and is by far not pushing the limits). But what can potentially cause "throttling" by IB is that the same hist.data is re-requested several times (which is a no-no) because of incorrectly formed EndDates..
|
|
|
Re: New Zorro version 1.96
[Re: Zheka]
#475119
11/23/18 19:38
11/23/18 19:38
|
Joined: Sep 2017
Posts: 235
Hredot
Member
|
Member
Joined: Sep 2017
Posts: 235
|
Hi Zheka, interesting to see that it works for you, while for me it just bounces back error messages. Perhaps I should put fewer assets into the list at once.
I agree, proper pacing is the task of the plugin, not the user. Zorro just being Zorro again... Even the Zorro manual still wrongly states that one cannot load historical data from IB.
I'm curious, Zheka, you seem to be rather experienced and certainly have access to multicharts, which by the looks of it is a far superior option. May I ask why you bother to waste time on Zorro?
Last edited by Hredot; 11/23/18 19:43.
|
|
|
Re: New Zorro version 1.96
[Re: Hredot]
#475123
11/23/18 23:53
11/23/18 23:53
|
Joined: Jul 2017
Posts: 784
Zheka
User
|
User
Joined: Jul 2017
Posts: 784
|
Mainly to trade Options and to access MT4 brokers (without having to learn and program in MQL). Perhaps I should put fewer assets into the list at once I dont think this has anything to do with the length of a list. Zorro will not start processing the next asset until it is finished with the current one. And there is no limitation in the API as to the number of paced requests.. Set IBG to a logging level "Detail" and try to see which commands come in as Zorro tries to connect and how API responds...
Last edited by Zheka; 11/24/18 00:06.
|
|
|
|