Hello, I have a problem with Trading toolbox and IBTWS.
I downloaded and installed the TWS API and I can create the ibtws object properly, using the following code:
Then I set up en empty contract structure as follows:
ibContract = ib.Handle.createContract;
ibContract.symbol = 'IBM';
ibContract.secType = 'STK';
ibContract.exchange = 'SMART';
ibContract.primaryExchange = 'IEX';
ibContract.currency = 'EUR';
I define the start and end date and then I try to call che history funtion:
bizDayConvention = 13;
startDate = daysadd(today,-20,bizDayConvention);
endDate = floor(now);
histTradeData = history(ib,ibContract,startDate,endDate)
When I call the history function, I get the following error:
Error using registerevent (line 72)
Error registering events. 'historicalDataEnd' is not a valid event name.
Error in ibtws/history (line 54)
Does anyone have a solution for this?
Thanks a lot,