Need help troubleshooting my IB historical data codes

Discussion in 'App Development' started by lime, Jul 3, 2024.

  1. lime

    lime

  2. 2rosy

    2rosy

    lime likes this.
  3. lime

    lime

    There are codes that make a file and write data in the *saveData()* call right before closeConnection(). Inside the method, I used a BufferedWriter to write in a loop (data in a Queue). Given I am not creating threads (except the EReader.start()), I think the IO operations shouldn't cause problems?
     
  4. lime

    lime

    I have manually run the main HistoricalDataDownloader.class repeatedly one right after the other, and it is working fine, but I get error in the 2nd loop of the script. The error seems to come from creating the downloader object in the 2nd loop. All parameters are the same as in the 1st except the ticker.

    I don't get why it happens....
     
  5. 2rosy

    2rosy

    create one downloader object
    loop over tickers
    call downloader.request(ticker)
     
    lime likes this.
  6. lime

    lime

    That is the correct way to do it, but I still don't get why I would get errors