Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automatically disable strategy and other problems on testing strategy.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Automatically disable strategy and other problems on testing strategy.

    Hallo.

    I'm testing my strategy on a simulated trading account of IB TWS.
    A single entry causes no problem, but an exit and entry at the same time (roundturn) causes a lot of troubles: automatically disabling the strategy in NT and various popup warnings of NT as well as TWS (see attachments).

    I'm using NT with IQFeed

    I don't know what to do to handle and solve these problems. Has it something to do with orderhandling in the strategy??

    Thx in advance.

    Regards,

    Theo.
    Attached Files
    Last edited by theodorus; 09-10-2013, 02:22 AM.

    #2
    Hi Theo, there's actually two separate issues you see here taking place (both would trigger the RealTime Error handling shutting your strategy down) - one is an order rejection as the limits on your paper account are breached (IB's precautionary settings) - this can be set under Edit > Global Config > API Precautions in their TWS.

    The other is an overfill - which is categorized as when an order returns a "Filled" or "PartFilled" state after the order was already marked for cancellation. The cancel request could have been induced by an explicit CancelOrder() call in your sript, from more implicit cancellations like those that occur when another order sharing the same OCO ID is filled, or from things like order expirations. You can think of those as being the same as an inflight execution basically in manual trading, you cancelled an order but before coming back as confirmed cancelled, it instead was filled as you were trading for example very close to the current inside market where a burst of activity could easily fill both sides of a bracket.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Hi Bertrand

      Thanks for your reply.
      About the first issue: how do I configure the API precautions to avoid my problem?

      Comment


        #4
        You would need to allow for a higher position / currency size traded there, it acts like a 'lock' on the account limiting you to a certain size only.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Hi Bertrand.

          In the demoaccount we're only trading 1contract!! So that should not be a problem...

          How do I configure the Api precautions? (see attachment)

          Regards.

          Theo.
          Attached Files

          Comment


            #6
            Correct, but for those the facevalue of the product would be checked, for your 2 ES contracts that is over the 100K set (as per the screenshot you shared). For the API you can also check to bypass those precautions completely, please see the first option in your latest screenshot of the IB config page.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              thx so far Bertrand

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by junkone, 04-21-2024, 07:17 AM
              9 responses
              67 views
              0 likes
              Last Post jeronymite  
              Started by trilliantrader, 04-18-2024, 08:16 AM
              4 responses
              18 views
              0 likes
              Last Post trilliantrader  
              Started by mgco4you, Today, 09:46 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by wzgy0920, Today, 09:53 PM
              0 responses
              10 views
              0 likes
              Last Post wzgy0920  
              Started by Rapine Heihei, Today, 08:19 PM
              1 response
              10 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X