Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stopping and starting strategies with positions on

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

    #46
    Yes, I got your email - thanks - the license would be shown directly to us in your header if you used the Mail to Support option...

    Thanks for the detailed input, I'll continue working on reproducing your strategy issue on my end here.

    Have you compared the OCO id's assigned in the orders tab?

    They would be unified by NT per default with a suffix when your strategy transitions from historical to realtime - http://www.ninjatrader.com/support/h...nt7/iorder.htm

    Comment


      #47
      Hi Bertrand,

      the OCO orders have the same OCO id in the IB TWS display and in the NT Orders tab.

      Have you not had any problems so far with your setup? The last 48 hours since Sunday evening have been filled with problems.

      There are so many that I don't whether to start new threads for them or whether they are all related to the instability brought about by re-enabling strategies.

      Here's my latest logs & traces:

      TracesAndLogs.zip

      The latest situation is that I have 20 strategies with positions, and since 10:00AM today NT is no longer using the OCO reference - neither in NT nor IB.

      Comment


        #48
        Beta21 and IB = death by thousand cuts

        I'll list all the problems here that Beta21 and IB are causing, several of which are new to me and make me think there's been some serious code changes in the strategy modules which needs making good.

        * unable to re-enable strategy with existing exit orders in place (see above)

        * unable to re-enable some strategies at all with the "immediately submit live orders" option, must set to wait until flat. Problem is that NT won't submit historical exit orders at all (new issue).

        * chart stopped updating without any error message or log last night at about 19:00. When I brought the chart to the front in windows, it had no 5 min bars for the last 50 mins, as though the market was closed. I was unable to tell if the strategies had also stopped receiving data. I stopped and restarted my strategies and then NT completely but then connectivity problems with IB historical data servers stopped me investigating further. It was probably something to do with IQFeed which I am also using to supply historical data, but which the charts and the strategies hook up to for live data too. Can I stop that and flag it for historical data only?

        * the status line stuck, normally showing "saved" after some operation requiring historical data had just finished. This is reported already and is probably a sign that NT has gone into an unstable state and requires restarting.

        * the OCO reference, when NT is using it (which is another problem) sometimes conflicts with IB's record resulting in error messages and submission failure, which means I can't re-enable the strategy. Last night I had to disable and re-enable several strategies repeatedly because NT was having connectivity problems with IB. After a while, I had to give up. This is new to me.

        28/09/2010 08:11:51 Order IB for historical data, Order rejected - reason:OCA group is already filled (201) affected Order: BuyToCover 100000 Stop @ 133.465
        * Then I found these messages this morning:
        28/09/2010 05:20:15 Strategy Strategy 'ThreeDucks002/19f70335f05a4169aeaa03dcdfccc618' submitted a cancellation request for Order ID '512731245' has not been confirmed cancelled. Please check your account orders and positions.
        You can see the subsequent messages and the strategy shutdown in the logs and traces.

        To replicate these issues I suspect you will have to run the same strategy as me on the same forex pairs. I have it running in simulation and live at the same time to compare, which is quite useful. Obviously this is really flushing the worms out of the woodwork. I hope the guys responsible for the strategies and/or the IB connection have everything they need to sort this all out. NT is becoming almost unusable. Fortunately I haven't lost any money doing this so I'm going to stick with it, but the whole situation is getting me pretty worried.

        Unfortunately I don't have to time or the money to stick to simulated trading - if live becomes unusable, I'll have to drop NT completely and invest my time and effort elsewhere.
        Last edited by adamus; 09-28-2010, 04:48 AM.

        Comment


          #49
          Adam, thanks for listing your current issues and sorry for the frustrations in the process - I'll reply in a sec to your direct email sent to me. Thanks

          Comment


            #50
            Hello,

            I am having some of these problems too.

            28/09/2010 08:11:51 Order IB for historical data, Order rejected - reason:OCA group is already filled (201) affected Order: BuyToCover 100000 Stop @ 133.465
            I am not having OCO orders.
            Today my orders were rejected around 11:53 with the OCA message as reason.
            My stoploss previously was triggered at around 11:40. Then I restarted NT, and my strategy (the same strategy, with the same parameters) somehow was in position, so it started to synchronize (I have the synch option set to true). But IB rejected my stoploss order.
            I've installed TWS again from here, to make sure I have the compatible version:


            This was not the first time it happened, but during that time I was having another issue, so I didn't deal with this.

            the status line stuck, normally showing "saved" after some operation requiring historical data had just finished. This is reported already and is probably a sign that NT has gone into an unstable state and requires restarting.
            This happened not so long ago. After the reinstall of TWS I've started NT, and started to download the missing data. But it was stuck after finishing it.

            Do you have any solution for it?
            Attached Files

            Comment


              #51
              Thanks for reporting in vides, so you restarted your strategy and as it attempting to place the historically working stoploss order you immediately saw the rejection from IB?

              Comment


                #52
                Yes, after restarting not just the strategy, but the entire NT.

                Comment


                  #53
                  vides2012,

                  Thanks. I will discuss this with Bertrand when he is in tomorrow and get back to you at a later point in time. Thank you for your patience.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #54
                    I installed beta 22, if that's relevant.

                    NT had the same problems re-enabling the strategies last night.

                    I have the options set to "immediately submit live working historical orders" and "cancel entry order when disabled". "cancel exit orders" and "sync" are disabled.

                    From Friday, I had 11 strategies with positions, all with a protective stop order and a target. NT couldn't cancel any of the existing orders, registering an error each time as before, and entering new orders.

                    After re-enabling each strategy, I canceled the old orders and now it seems there is a change - this canceled all the orders on the strategy, including the new orders. So the OCO process worked better.

                    To fix the situation, I disabled the strategy and re-enabled it, and this was the same for all strategies so now the strategies are all enabled and correct.

                    If it helps, here is the logs zip: TracesAndLogs.zip

                    Comment


                      #55
                      Thanks Adam, I'll be in touch via regular email in reply to your note - I'm currently clarifying with IB the error you got.

                      Comment


                        #56
                        Thanks Adam, I'll check with development into, I'm not sure what's expected here - I was more interested in your other issue, namely the 'Unable to cancel order: Internal Error, reference to IB order missing' - is this happening to you only if you try persisting strategies and orders across the weekend?

                        Thanks

                        Comment


                          #57
                          Oh! Sorry my mistake, I posted to the wrong thread.

                          re: weekends, I think it's true, it's only orders over the weekend that had that issue. I had to stop and start the strategies quite a few times yesterday and today and I didn't experience this issue.

                          Comment


                            #58
                            I stopped all my strategies, disconnected from IB, rebooted my modem and re-enabled them just now.

                            All went fine for 9 strategies, the old target and stop were either accepted or sometimes cancelled and replaced. However for 1 strategy, the old target and stop were cancelled, but only a new target was entered. NT forgot to enter the stop.

                            I cancelled the stop manually, and stopped the strategy. Re-enabling it went fine. It re-issued a target and a stop this time.

                            Do you want to see the log?

                            Comment


                              #59
                              adamus,

                              Restarting a strategy does not necessarily mean it will bring back all the same orders you had prior. It depends on how it recalculates. I strongly suggest using TraceOrders = true to fully understand what your orders are doing and why they are doing what they are doing.

                              As your scenario is extremely complicated with a ton of strategies all trying to do their own thing you will need to provide exact strategy IDs and timestamps along each step of the way so we can take a look at the logs. Thank you.
                              Josh P.NinjaTrader Customer Service

                              Comment


                                #60
                                Josh,

                                I have a pretty good handle on what to expect when I re-enable a strategy that has position & orders. That why I stated above that the order cancelations and replacements were expected for some of the strategies. Other strategies just adopted the existing orders without cxling & replacing.

                                However one strategy had a problem as it did not submit a working stop order despite cancelling the previous one. You want the strategy id for it? Is that your request?

                                I submit my logs and traces every time something major happens - what more do you want? How would I ensure you see the strategy ids?

                                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