IB API - Delayed order execution

Discussion in 'Order Execution' started by Robco, Jun 6, 2018.

  1. Millionaire

    Millionaire

    Normally when you see a pause in a Java process your first thought is the Garbage collector pause.
     
    #11     Jun 7, 2018
  2. Robco

    Robco

    Thank you for your advise, I will try to add a param -XX:+UseParNewGC to the command line as it should limit pause during GC. Anyway it sounds strange, that I would be the only one who has this kind of issue, or the only one who is complaining.
     
    #12     Jun 7, 2018
  3. traider

    traider

    What asset class are you trading? What exchange are you hitting?
     
    #13     Jun 7, 2018
  4. DaveV

    DaveV

    When was the last time you stopped and restarted the IB Gateway?
     
    #14     Jun 7, 2018
  5. Robco

    Robco

    Actually it is started 30 minutes before the trade time and 2 minutes after market is closed, the whole virtual is stopped.
     
    #15     Jun 7, 2018
  6. Robco

    Robco

    I'm trading Share CFDs of SP100 stocks. Delay is after all trade requests are received by the IB GTW.
     
    #16     Jun 7, 2018
  7. Millionaire

    Millionaire

    How many trade requests in total? Your opening post implied just one trade.
     
    #17     Jun 7, 2018
  8. Robco

    Robco

    Usually I have 1 to 5 trades per day.
     
    #18     Jun 7, 2018
  9. Unless choosing which stocks to trade super near to the closing time is the entire point of your strategy, maybe you can just use Market On Close orders instead. You can submit the orders much earlier so that a few seconds delay becomes utterly irrelevant. The exchange fees for MOC orders are also smaller than for taking liquidity intraday.

    Also, I'm pretty suspicious of the fact that you are trading share CFDs of SP100 stocks. I might be missing something but I'm thinking you haven't done the math and you're likely spending more fees and overnight margin interest compared to regular shares. Or if you're using CFDs for the increased leverage, you're probably taking too much risk. Going all in with leverage on just 1 stock overnight will eventually blow up your account.
     
    #19     Jun 12, 2018
  10. Robco

    Robco

    Currently there is no reason to trade share CFDs and I indeed have to switch back to the standard stocks. Originally I used them due to higher margin, so in case something would happen (10-15% market correction when I'm fully loaded), margin call would not be applied. This is not true anymore, CFD margin conditions are now almost the same as for shares.
    I never used MOC before, so I was not sure about the liquidity and spread. Thanks for advice, I will check the details.
    But back to the topic, In the meantime I did couple of tests and I'm suspecting IB Controller which starts my IB Gateway. When I started IB Gateway manually, exec times were within one second from the time I sent order requests. When I kept IB Controller to start IB GW, exec times were delayed approx 4 seconds again. Could be an accident, but I personally do not think so.
     
    #20     Jun 12, 2018