Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stopping and starting strategies with positions on

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

    #16
    Hi Josh,

    I upgraded today to beta 19. Perhaps this has solved the issue.

    On restarting, I had a position on with the OCO target limit and stop loss. I figured I'd have to do the same as last week if the strategy cancelled the 2 OCO orders.

    However when I enabled the strategy, it popped up a warning with the text "unable to cancel out unmapped live orders".

    Perhaps you can tell me if this is expected behaviour or if there is still an issue. I have no knowledge of how the strategy would map its orders or identify old ones to re-map, or why its old orders should become unmapped when the strategy is disabled.

    Thanks

    Comment


      #17
      more symptoms of strange issue

      Yesterday's close demonstrated again that there is something amiss with the strategy order mapping.

      My IB TWS config is set to shut itself down at 22:15 GMT+1.

      Shortly before that, I disconnected NT from IB. IB then shut down, I re-opened it and re-connected and everything ran smoothly.

      However through bad luck my internet connection failed shortly after that, requiring TWS to be closed and re-opened once more.

      Again, before I shut down IB TWS, I disconnected NT.

      Then things started to go wrong.

      NT gave me the "NT needs to restart" message, which I did. I then reconnected NT to IB and then began enabling the strategies.

      I had 3 strategies which had positions during this episode. One was trading on $EURUSD and this one didn't restart cleanly. It cleared out the existing target and stop OCO orders, requiring me to intervene manually.

      The other two strategies with positions and OCO orders were managed without problem.

      Worse, later on this morning, the situation became very confused because the strategy on $EURUSD was reporting that it was long with an unrealised profit, but this didn't tally with the positions in NT nor IB.

      I don't have any idea whether this would have an effect, but I disabled and removed the strategy and set it up again in the hope that it was something wrong with the configuration for the strategy.

      Comment


        #18
        adamus, sorry for our late follow up - could you please pass the trace and logs from your recent issues via Help > Mail to Support to us?

        With what order handling options under Tools > Options > Strategies > NinjaScript are you working?

        Is this in connection with TWS 906?

        Comment


          #19
          Hi Bertrand,

          you should have the email from my control center now.

          This is TWS 906.

          I have the order handling options set to "Cancel entry orders" checked, and "Cancel exit orders" not checked. As at the beginning. I haven't changed them.

          I hope there's a solution to this somewhere down the line. I don't even want to describe the problems I'm having at the moment. IB is not letting me connect to their data farms right now despite multiple attempts and this has caused NT to destroy its data for today and yesterday by adjusting it 50% upwards. It's quite hair raising considering I have positions in the market. Fortunately the markets aren't moving much at this time of day.

          What would be great is NinjaTrader support for the IB gateway that doesn't require daily shutdowns. Is this nowhere on the radar? I might just try it anyway to save all this hassle.

          Comment


            #20
            adamus,

            I will discuss this case with Bertrand when he gets in tomorrow.

            Unfortunately there is no ETA for IB gateway support, but it is on our feedback list.
            Josh P.NinjaTrader Customer Service

            Comment


              #21
              adamus, just replied to your email directly - could you please also send us the DB to investigate as this seems to be related?

              Thanks in advance.

              Comment


                #22
                OK, you should have it.

                I did have to reload much of the historical data to get rid of the bad data. hopefully this hasn't masked any of the information you are looking for.

                Comment


                  #23
                  Thanks, just came in, we'll take a look.

                  Comment


                    #24
                    Hi Bertrand,

                    I just mailed you my logs and traces. There are some error messages in there which I haven't seen before associated with enabling a strategy.

                    Yesterday at close of business NY time, IB TWS lost its data connection for historical data for about 90 mins. When I reconnected NT to TWS and tried to enable the strategies, none of the strategies with open positions and orders would start. They all gave errors.

                    "CancelAllOrders faileld4: barsInProgress=0 historical=False Orders.Count=6 instrument='$AUDUSD' exp=Index was outside the bounds of the array."

                    This is a change in behaviour from previously, when the open orders would have been cancelled.

                    Also the strategies are not highlighted in green when active. Is this a new introduction with beta 19?
                    Last edited by adamus; 07-29-2010, 05:29 AM.

                    Comment


                      #25
                      Adamus, just responded to your notes send directly to support - we could unfortunately not reproduce here and added more detailed traces for the next beta to gain more insight into the issues you get.

                      There has been no change in the strategy state coloring behavior with B19, which color are you seeing?

                      Comment


                        #26
                        Originally posted by NinjaTrader_Bertrand View Post
                        There has been no change in the strategy state coloring behavior with B19, which color are you seeing?
                        Hi Bertrand,

                        I'm looking forward to the next beta release!

                        re the strategy state colour: currently my strategies have no colour. They were OK yesterday but today, they don't change to green or yellow. It's slightly worrying but I can see from my logging that the strategies are active.

                        Comment


                          #27
                          Adamus, this would normally signify a disabled strategy then - are you seeing the 'enabled' checkmark in the strategies tab still?

                          Comment


                            #28
                            Yes they are clicked enabled. And they all trade. Just no colour.

                            Comment


                              #29
                              Unfortunately I'm not sure why you would see this anomaly, I can only imagine this is related to your other IB connection / DB issues you reported previously. Please report back your findings with the expanded traces in this area on next beta so we can continue to check into.

                              Comment


                                #30
                                Hi Bertrand,

                                the colours appear to be gone permanently. I re-started NT and re-enabled all the strategies but the colours are not back.

                                To solve this situation with the IB connection problem, I subscribed to IQFeed for historical data and it's a lot faster to load for charts and strategy enabling. Hopefully I won't suffer the same complete connection loss after NY close tonight.

                                After I re-started NT, I had to re-enable all my strategies and 5 strategies had positions. This time the old, original problem recurred. For two of the strategies, EURUSD and USDJPY, NT just cancelled the existing orders. The other strategies were fine, the re-start picked up the positions and existing orders without a hitch.

                                So I was left with 2 naked positions. I will have to enter the orders manually when I finish and stop watching the markets.

                                Another problem that I discovered is that the OCO target and stop that NT submitted were not flagged as OCO in IB. When one order was filled, the other order remained and had to be cancelled manually.

                                But this isn't the case with all the orders. In IB, sometimes I see that NT has applied an OCO id to the orders and IB displays it.

                                Lastly, almost forgot - despite stopping and starting NT and disabling and re-enabling the strategy, the strategy performance chart for EURUSD (attached) is messed up and isn't collating the entries and exits into proper trades. You can see on the image some of the trades have multiple exits!
                                Attached Files
                                Last edited by adamus; 07-29-2010, 01:05 PM.

                                Comment

                                Latest Posts

                                Collapse

                                Topics Statistics Last Post
                                Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                                0 responses
                                606 views
                                0 likes
                                Last Post Geovanny Suaza  
                                Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                                0 responses
                                351 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by Mindset, 02-09-2026, 11:44 AM
                                0 responses
                                105 views
                                0 likes
                                Last Post Mindset
                                by Mindset
                                 
                                Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                                0 responses
                                560 views
                                1 like
                                Last Post Geovanny Suaza  
                                Started by RFrosty, 01-28-2026, 06:49 PM
                                0 responses
                                561 views
                                1 like
                                Last Post RFrosty
                                by RFrosty
                                 
                                Working...
                                X