Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Premarket order not transferred correctly to TWS

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

    Premarket order not transferred correctly to TWS

    I have a strategy that starts buying FAZ or FAS starting at 8.30.

    In NT these ETFs are defined as Stock with exchanges ARCA and Default
    In TWS the Stock preset allows trading outside normal hours.

    I see in the log that the order market for FAS was correctly issued at 8.40.
    However the order ends up in TWS as a 'normal' order (with the clock without yellow triangle ... so apparently not allowed to be excecuted pre-market)

    The market order just sits there until normal market hours start at 9.30.
    (If I manually type in an order for FAS, TWS by default allows the pre-market status and order excecutes immediately)

    Any idea how I get this working?

    #2
    Hi WhoKnows, do you get an error in the log tab upon sending the 8:40 FAZ market order to IB?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      No error, only a warning about outside hours. But I get these all the time with FAS, even at 9.40.

      It is order
      fe1aa585a3c44cc99453a2b0f344e128/U523265 , the other order I put in later by hand went through immediately.

      3/4/2009 9:30 Order Order='726544211/U523265' Name='Profit target' New State=Working Instrument='FAS' Action=Sell Limit price=4.75 Stop price=0 Quantity=755 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 9:30 Order Order='726544211/U523265' Name='Profit target' New State=Accepted Instrument='FAS' Action=Sell Limit price=4.75 Stop price=0 Quantity=755 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 9:30 Order Order='726544210/U523265' Name='Stop loss' New State=Accepted Instrument='FAS' Action=Sell Limit price=0 Stop price=3.92 Quantity=755 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 9:30 Position Instrument='FAS' Account='U523265' Avg price=4.13 Quantity=1 510 Market position=Long Operation=Update Currency=UsDollar 3/4/2009 9:30 Execution Execution='+ESLR 01-10 C 2.5/0001d685.49ae906e.01.01' Instrument='+ESLR 01-10 C 2.5' Account='U523265' Exchange=Cboe Price=0.35 Quantity=5 Market position=Short Operation=Insert Order='683401329' Time='3/4/2009 9:30:14 AM' 3/4/2009 9:30 Order Order='683401329/U523265' Name='External' New State=Filled Instrument='+ESLR 01-10 C 2.5' Action=Sell Limit price=0.35 Stop price=0 Quantity=5 Type=Limit Filled=5 Fill price=0.35 Error=NoError Native error='' 3/4/2009 9:30 Default Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109 3/4/2009 9:30 Order Order='13903f0707c94399a4461d737fffe183/U523265' Name='Profit target' New State=PendingSubmit Instrument='FAS' Action=Sell Limit price=4.75 Stop price=0 Quantity=755 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 9:30 Order Order='86b737b75f8a4cf989b9e16177cd6b00/U523265' Name='Stop loss' New State=PendingSubmit Instrument='FAS' Action=Sell Limit price=0 Stop price=3.92 Quantity=755 Type=Stop Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 9:30 Execution Execution='FAS/00015c5f.49ae709d.01.01' Instrument='FAS' Account='U523265' Exchange=Island Price=4.17 Quantity=755 Market position=Long Operation=Insert Order='726544191' Time='3/4/2009 9:30:11 AM' 3/4/2009 9:30 Order Order='726544191/U523265' Name='Entry_L' New State=Filled Instrument='FAS' Action=Buy Limit price=0 Stop price=0 Quantity=755 Type=Market Filled=755 Fill price=4.17 Error=NoError Native error='' 3/4/2009 8:58 Position Instrument='FAS' Account='U523265' Avg price=4.085 Quantity=755 Market position=Long Operation=Insert Currency=UsDollar 3/4/2009 8:58 Execution Execution='FAS/00015c5f.49ae6f5d.01.01' Instrument='FAS' Account='U523265' Exchange=Island Price=4.08 Quantity=555 Market position=Long Operation=Insert Order='726544193' Time='3/4/2009 8:58:04 AM' 3/4/2009 8:58 Execution Execution='FAS/00015c5f.49ae6f5c.01.01' Instrument='FAS' Account='U523265' Exchange=Island Price=4.08 Quantity=200 Market position=Long Operation=Insert Order='726544193' Time='3/4/2009 8:58:04 AM' 3/4/2009 8:58 Order Order='726544193/U523265' Name='External' New State=Filled Instrument='FAS' Action=Buy Limit price=4.09 Stop price=0 Quantity=755 Type=Limit Filled=755 Fill price=4.08 Error=NoError Native error='' 3/4/2009 8:58 Order Order='726544193/U523265' Name='External' New State=Working Instrument='FAS' Action=Buy Limit price=4.09 Stop price=0 Quantity=755 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 8:58 Order Order='726544193/U523265' Name='External' New State=Accepted Instrument='FAS' Action=Buy Limit price=4.09 Stop price=0 Quantity=755 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 8:58 Order Order='726544193/U523265' Name='External' New State=PendingSubmit Instrument='FAS' Action=Buy Limit price=4.09 Stop price=0 Quantity=755 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 8:56 Order Order='726544203/U523265' Name='External' New State=Working Instrument='FAX' Action=Buy Limit price=3.5 Stop price=0 Quantity=300 Type=Limit Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 8:40 Order Order='726544191/U523265' Name='Entry_L' New State=Working Instrument='FAS' Action=Buy Limit price=0 Stop price=0 Quantity=755 Type=Market Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 8:40 Order Order='726544191/U523265' Name='Entry_L' New State=Accepted Instrument='FAS' Action=Buy Limit price=0 Stop price=0 Quantity=755 Type=Market Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 8:40 Default Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed. 2109 3/4/2009 8:40 Order Order='fe1aa585a3c44cc99453a2b0f344e128/U523265' Name='Entry_L' New State=PendingSubmit Instrument='FAS' Action=Buy Limit price=0 Stop price=0 Quantity=755 Type=Market Filled=0 Fill price=0 Error=NoError Native error='' 3/4/2009 8:37 Strategy Starting NinjaScript strategy 'aS03_v05_SuperTrend_ReEntry_Stop_FAZ_Long/fe78f84e303848e28754ff214e0202a2' : On starting a real-time strategy - StrategySync=SubmitLive EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=ByStrategyPosition ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=AccountSize 3/4/2009 8:36 Strategy Starting NinjaScript strategy 'aS03_v05_SuperTrend_ReEntry_Stop_FAS_Long/6281cc88d29844af94ae6fe33f4406b7' : On starting a real-time strategy - StrategySync=SubmitLive EntryHandling=AllEntries EntriesPerDirection=1 StopTargetHandling=ByStrategyPosition ErrorHandling=StopStrategyCancelOrdersClosePositio ns ExitOnClose=True/ triggering 30 before close Set order quantity by=AccountSize

      Comment


        #4
        Thanks - this is just a warning and it will not affect actual order execution, have you set your account connection and TWS up to allow to trade outside regular trading hours as mentioned in the connection guide? - http://www.ninjatrader.com/webnew/su...ivebrokers.htm
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Yes, I followed that manual to set up.
          Trigger after hours is set to true in NT connection.
          In NT these ETFs are defined as Stock with exchanges ARCA and Default

          In TWS configuration (order defaults) the STK preset is set to allow trading outside normal hours.
          The only issue I see in TWS that there is no separate order default for ETFs in TWS, but in NT it is also a Stock. Or should I set CFD,OPT,FOP,WAR,FUT,FWD,COMB,IND,BOND,BILL,FIXED also to allow utside normal hour trading?


          Unfortunately I can not replicate this behavior in Market Replay.
          The order appears in TWS at 8.40 (I looked at it within TWS yesterday), but not with the right attribute permitting outside orders trading.
          Last edited by WhoKnows; 03-05-2009, 02:35 AM.

          Comment


            #6
            Thanks for your reply WhoKnows - I would suggest to setup the ETF's in NinjaTrader only with the ARCA exchange and check if this changes the appearance of the orders in your TWS.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              After setting FAZ and FAS to ARCA only I still saw the triggered order in TWS as normal order (without the yellow outside hours setting).
              I tried all on another computer with the same effect.

              It is tricky to test different settings on a live NT/TWS setup as the order will be executed when it works. So I have to wait until the strategy triggers.

              I there a way to have bogus strategies triggering orders to TWS (just to test situations) .... without having the order excecuted?
              Have you at NT ever tried/succeeded to get ETFs triggered outside normal market hours?

              Comment


                #8
                Hi WhoKnows, you could test this on your IB Paper Account to make life simpler.

                Did you try to sync up your PC clock and then rebooting before testing this?
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Paper account ... stupid I didn't think about that one.
                  Will test tomorrow.

                  thnx

                  Clocks were on correct US time and both PC reset too.

                  Comment


                    #10
                    Ok tested with IB paper account and simple test strategy on my 2nd computer.
                    Only line in strategy was: if Close[0] > 2 ... enter long
                    Then I opened 1 minute chart and set properties to chart start time 1 minute after PC time (set to US time).
                    After starting the strategy had to wait 1 minute until the order triggered.

                    I still get only normal hour orders ... tested this with FAS and also AA.

                    IN TWS 'allow outside hours' is checked.
                    In NT connection properties 'trigger after hours' is checked.

                    Any idea how to solve this!!
                    Can you try on your side if you can trigger immediate orders between 6.30-9.30 US market time.

                    Comment


                      #11
                      Thanks for reporting back WhoKnows, I will investigate and let you know.
                      BertrandNinjaTrader Customer Service

                      Comment


                        #12
                        Hi WhoKnows, does this also happen when you place the order manually?

                        I reread your post about order defaults for stocks, NinjaTrader treats the ETF's as stocks, the same as the TWS so you should be fine by just allowing the outside market hours triggering for this type.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          As mentioned in mail 1, typing the order in manually executes the order immediately.
                          I tried this several times. It even cost me 500$ when I tested this and did not think clear enough and bought 100 FAZ at a ridiculous wide 6$ pre-market spread.

                          That's the strange thing. The setting in TWS and NT appear to be in order.
                          However when executing an order from the strategy it does not work.

                          Even a test strategy containing only the line ' if Close[0] > 2 ... enter long' the order does not execute and waits until 9.30.
                          I tested this with opening a 1 minute chart and setting the chart properties to a start time 1 minute after PC time (set to US time). After starting the test strategy I had to wait 1 minute until the order triggered.

                          As mentioned below... I tested this with FAZ (ETF) but also wth AA (Alcoa stock in your instrument list).
                          And ... no go ... the order appears in TWS as NONoutside market order and is left to 9.30.

                          Therefore pls. try this on your side.

                          Comment


                            #14
                            Hi WhoKnows, thanks for your patience - I'm working with development to get this resolved for you, could you please send me your trace and log files from March 4th to support at ninjatrader dot com Attn Bertrand. Thank you!
                            BertrandNinjaTrader Customer Service

                            Comment


                              #15
                              Thanks we got the files.
                              BertrandNinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by arvidvanstaey, Today, 02:19 PM
                              2 responses
                              6 views
                              0 likes
                              Last Post arvidvanstaey  
                              Started by jordanq2, Today, 03:10 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post jordanq2  
                              Started by traderqz, Today, 12:06 AM
                              10 responses
                              18 views
                              0 likes
                              Last Post traderqz  
                              Started by algospoke, 04-17-2024, 06:40 PM
                              5 responses
                              46 views
                              0 likes
                              Last Post NinjaTrader_Jesse  
                              Started by mmckinnm, Today, 01:34 PM
                              3 responses
                              6 views
                              0 likes
                              Last Post NinjaTrader_ChelseaB  
                              Working...
                              X