• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.


No announcement yet.

Partner 728x90


NT 6.5 Bug

  • Filter
  • Time
  • Show
Clear All
new posts

    NT 6.5 Bug

    I had been going back and forth with NT for 3 days last week trying to resolve a simple issue, in which I created a few simple strategies within the strategy wizard. All tested ok and did fine in replay. When attempting to trade in demo account (IB) some strange behavior emerged.

    Basically every position held had a stoploss order live @ IB, however any execution of any one of these orders would cancel every other protective stop.

    IB determined that my strategies were sending OCA orders, which NT does not support. After 3 days behind the scenes emailing NT and bothering IB I received this email from NT support....

    First of all thanks for patient replies.
    Development analyzed the issue and you unfortunately run into a bug for NT 6.5, a fix has been added to NT 7 already - http://www.ninjatrader.com/webnew/NT7/NinjaTrader7.html
    For 6.5 a potential workaround would be ensuring the strategies are set to 'WaitUntilFlat' mode.
    Have a great weekend and thanks again for your patience getting to the core of this.

    Sorry NT, but to point me to the generic NT7 link @ 5:30 pm on a friday felt like a brushoff. More importantly,
    what miraculous "bug" did I uncover?
    Last edited by rightcoast; 01-31-2010, 11:30 AM.

    Sorry if you felt brushed off. I personally reserached the issue on the tech side. Here are more details: NT does support native IB OCA orders. In fact that contributes to the trouble here which is:
    - you had your strategies running in SubmitLive mode, meaning any pending order from backtest would be submitted live EXACTLY how it would be "left over" from back test
    - in your scenario all your backtested strategies had exit order pending as they went live. And all those backtest orders had the generic SAME oca ID "NT-00000"
    - this OCA id was applied to all exit order which had been turned live on your strategies and resulted in cancelling out all those orders as one of them got cancelled or filled

    The bug in there is that NT did not make those OCA ids unique per strategy as the orders had been turned live. This was fixed for NT7.

    However, we consider this a critical change to NT. Thus we had it fixed for NT7 to not introduce unnecessary risk to NT6.5 as your report on that issue (although very valid) was the first one in 3+ years.

    I hope that clarifies the situation.
    DierkNinjaTrader Customer Service


      Thanks Dierk,
      We did not speak directly on this last week but I did realize you were looking into it on Friday, so in fairness you were aware of this for 1 day only.

      My question now is..

      1. Do I attempt to run the same strategies in NT7 now or

      2. Do I run them in 6.5

      Both have bugs understood. If I understand correctly I should run in "WAITUntilFlat" mode. any existing positions I should manually enter
      stops etc. so any new entries will not be considered "bunched" as part of
      a prior backetest?

      EIther way thanks for some clarification


        I noticed your strategies ran on a paper trade connection. Thus, I feel save to say that you could try next NT7 beta update.

        The story would be different if you wanted to run your strategies an a live account. Then I would suggest going with NT6.5 and use the option WaitUntilFlat.
        DierkNinjaTrader Customer Service


          Well I took your advice and used "waituntilflat". However one strategy doesn't trade often (swing) tried syncing manually....

          1. Strategy is long but were in (waitUntilFLat) mode

          2. manaully entered long trade with manual stop @ IB

          3. New signal in strategy says exit long and get short, however end result
          is manual long is flat so postion is flat with maunal sell stop and a new
          buy stop from the strategy active.

          4. Summmary: strategy is short with a protective buystop.
          Realtiy: My broker position is flat with 2 actvie stops to protect a long
          and a short that do not exist. (ie in reality).

          Ok I understand now that you cannot "sync" positions in "waitUNtilFLat" mode. So the easy answer seems to be that If you want to hold positions overnite that you use "waitUntilFlat" and DO NOT sync. Also do not use "execute immediately" because 6.5 has a bug and will treat all existing or positions you decide to manually sync as one group "OCA".

          So If my broker like many logs off 1 time a day and in turn cutsoff my strategy, how is it possible to trade anything overnight in NT where you keep an active stop @ your broker?


            Guys, I really wish instead of poking @ NT I could put on some trades.


            Reading through the forum it is evident that you can run NT 24hrs w/ IB, with a little help. So "wait until flat" is workable if you keep the strategy/broker running 24/7. Unfortunately if you have a position over the weekend you SOL, because you cannot control the weekend logoff of IB???. So monday morning we need to "wait until flat" to trade new positions but we would also need "immediate submit live" (BUGS 6.5) to account for our existing swing postions. Am I the first to discover this Major flaw in the platform?

            Anyway, I have NT7 which has bugs as well but for what I need, realtime trading with ability to trade overnight, can NT7 be trusted yet to swing trade as described? and if not an honest assessment as to when is in order. Thanks



              You cannot use WaitUntilFlat for swing trading in that scenario. If strategy is started as long, WaitUntilFlat means the strategy will not place any real trades till the strategy has crossed a flat state. This would mean you have to have your account position as flat, which negates the whole point of swing trading it.

              To workaround, not the most elegant, but as a last resort before NT7, what you could try is forcing up the counter ID by placing different amounts of dummy trades in each of your strategies and just use them with the mode you were using before WaitUntilFlat.

              Strategy A you could just have it trade 2 times historically to get the OCO id to be NT-0002. Then Strategy B, you could have it trade 3 times to get the counter up to NT-0003. With different IDs your trades would not be linked up together and would be separate entities. That should get you around the issue.
              Josh P.NinjaTrader Customer Service


                Hey Josh

                Im digging your improv idea in 6.5

                Anyway, to change the amounts of dummy trades per strategy, is it just a matter of making the historical data per chart/strategy different? so strategy ex.

                A= hourly chart for 3days

                B= hourly chart for 10 days

                Actually wouldn't the amount of trades per instrument have to be altered as well to prevent cancels from happening within the same strategy?
                Last edited by rightcoast; 02-03-2010, 04:35 AM.


                  I decided to check the log per each entry/sync "execute immediate" w/ IB. As stated each NT-00001 order that is the same is considered OCA in TWS so an execution in any one of the same NT-0000 numbers will cancel all orders with the same number.

                  Both strategies submitted stops and 1 strategy had limits as well. This in the order I started the strategies and the corresponding NT- # that was assigned by NT.

                  - Stop NT-00001
                  - Limit NT-00002

                  - Stop NT-00005
                  - Limit NT-00006

                  Strategy 2:
                  -Stop NT- 00003
                  -Stop NT- 00006
                  -Stop NT- 00001
                  -Stop NT- 00001
                  -Stop NT- 00004
                  -Stop NT- 00001
                  -Stop NT- 00001
                  -Stop NT- 00004

                  Overall there is plenty of identical NT- OCA numbers. It seems that the timeframe adjustment is at best a rough measure to calculate # of historical trades.


                    Just so you know I attempted to do the same thing in NT7 and it's doing the same thing. Looking @ screenshot the TWS classifies each group, I can re-create by simply cancelling any order inthat group, in this case NT-00002 ...WHam! cancels all orders that are OCA group NT-00002.

                    Can somebody come clean here, NT6.5 has the bug that doesn't seem to have a fix. But NT7 has the fix but you shouldn't use it yet to trade. But I seem to run into the same old 6.5 bug. Is NT designed to trade beyond a single session? It can test that way but can it trade that way with IB?
                    Attached Files


                      rightcoast: I believe we understand what causes the issue and how it needed to be resolved. I tried to outline the options which are available at that time. Please let me know as something still would be unclear in regards to those options.

                      The fix which Nt7 will provide will be available with next update within the next few days.
                      DierkNinjaTrader Customer Service


                        Thanks Dierk,

                        But since I am using real money on your platform it was and is always important that I understand the problem. Workarounds were appreciated but since I rely on NT to trade it's extremely crucial to know your companys intent on fixing the problem. Words mean a lot, what some call
                        a bug might also be called a catastrophe. Overall it cost me in both P&L
                        and downtime but at least we uncovered something and NT is better off
                        Last edited by rightcoast; 02-03-2010, 04:23 AM.


                          Hello Dierk, *****Just Amended Image*****

                          I attempted to do Josh's previous recommended workaround. If I performed this incorrectly then possibly someone could please clarify.

                          Basically "immediately submit live" is checked. The other option as discussed "wait until flat" does not work for this instance. I used charts
                          of different lengths so historical # of trades would be different.

                          After launching each strategy the NT log was checked to ensure that each NT-00000 group was different, they were. Attached is a copy/edited log of the instance I am referring to. This example shows that
                          we can have different NT-00000 group classifications that IB can and will
                          classify as the same group.

                          I am not trying to be a nuisance here, but I have been demanding answers and any new issues should be helpful in your troubleshooting.
                          Overall I think the only fix is NT7 or to move to another platform. Please
                          contact me @ your earliest convienience to discuss NT's committment to this issue. TY
                          Attached Files
                          Last edited by rightcoast; 02-03-2010, 07:48 AM.


                            Our commitment is that
                            - this issue will be addressed with next update of NT7 within the next few days
                            - on NT6.5 you had the work around we provided. Please let us know know if it's not working

                            Thanks for your understanding.
                            DierkNinjaTrader Customer Service


                              Someone from our sales department will contact you shortly.
                              DierkNinjaTrader Customer Service


                              Latest Posts


                              Topics Statistics Last Post
                              Started by sgordet, Today, 08:07 PM
                              0 responses
                              1 view
                              Last Post sgordet
                              by sgordet
                              Started by smcllr, Today, 08:04 PM
                              0 responses
                              Last Post smcllr
                              by smcllr
                              Started by 5element, Today, 02:46 PM
                              1 response
                              Last Post Emma1
                              by Emma1
                              Started by jeronymite, Today, 04:47 PM
                              0 responses
                              Last Post jeronymite  
                              Started by jtrading82, Today, 04:05 PM
                              0 responses
                              Last Post jtrading82