Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy and ChartTrader Conflict

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

    Strategy and ChartTrader Conflict

    Setup: NT7.0.0.9 MBTrading(live), Navigator 11.3.0.4

    From control center.strategy window, a NTscript strategy ws enabled, and it entered a position with ProfitTarget and StopLoss actived by the strategy. The stopLoss and limit orders had working status in the control center.orders window.

    I then changed focus to a chart window of the same symbol as the strategy was running (BGU). ChartTrader was closed and its minimize arrow was not visible in the border area.

    I then opened chart trader with the menu bar icon. The chart displayed the stoploss and limit orders that the NTscript had entered and it duplicated those orders. I now had a double stoploss and limit orders showing on chart. The live entry order was not duplicated.

    The NTscript strategy exited its position and one set of stoploss and limits were removed. An exit order however was not issued.

    Confused as to what was happening, I clicked the cancel "X" on ChartTrader stoploss line and the 2nd limit and stoploss was cancelled. The position remained visible so I then hit ChartTrader "CLOSE" button to exit the position. The position was sold.

    I closed chart trader with minimize arrow.

    The NTscript strategy had disabled itself (not by script). I enabled the strategy and got an error message "Failed to execute DB job 'StrategyUpdateJob': The primary key value cannot be deleted because references to this key still exist. [ Foreign key constraint name = FK__nt_strategy2strategy__00000000000002D4 ]

    I had to repair and reset the database and exit NT twice before I could enable the strategy.

    There is conflict between Chart trader and NTscript strategy.

    If strategy and ChartTrader conflict, then ChartTrader should be locked out from activation.

    There is no way to remove ChartTrader from a chart. It can only be minimized with its minimize arrow left showing on the chart border. This leads to confusion as to weather or not it is active. There should be a way to remove it.

    #2
    Camdo,

    I suspect you had a position prior to the start of the NS strategy. Are you able to reproduce the StrategyUpdateJob message?

    The Chart Trader will show any open position/order as you turn it on. To turn if off, press the Chart Trader toolbar button again.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Where would I find the StrategyUpdateJob Message?

      When NTscript strategy places an order, I do not get the voice message "order placed" or "order sold". Is this correct?

      I cannot be certain there was not a prior order, but sure there wasn't one.

      Thanks for the tip on closing ChartTrader.

      As I understand your responce, there is no inherent conflict with a NS strategy running in controlPanel and a chart's ChartTrader of same instrument. I should be able to trade the instrument with ChartTrader while the strategy is running. Is that correct?
      Last edited by Camdo; 02-11-2010, 04:55 PM.

      Comment


        #4
        Camdo,

        That is correct. No inherent conflict.

        StrategyUpdateJob would either come up as its own popup or maybe an entry in the Control Center logs when something goes wrong.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          I will run some more strategys and see if problem repeats.

          Comment


            #6
            I am wondering if the problem is with the NS strategy.

            If a stategy runs continuously thruout the day,
            and makes many paired entry and exit trades of the same symbol,
            and the exit trades are by execution of stoploss or profit target,
            Must the strategy generate a new and unique signal name for each entry order?

            Comment


              #7
              Camdo,

              Signal names are given as instructed by the strategy code. If your code says use "A" as the name and you use that code multiple times you would have had many orders with that exact same name.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                So reusing the name does not interfer with a second, or more, execution of a SetStopLoss or SetProfitLimit within a continously running NS strategy.

                Comment


                  #9
                  Camdo,

                  To clarify, you should not have two orders with the same entry signal name working at the same time. If one is closed, you can reuse the name again without any issues. If you are trying to have multiple entry orders opening a position at the same time you should use different signal names.
                  Josh P.NinjaTrader Customer Service

                  Comment


                    #10
                    I ran more strategy and found another problem:
                    SetStopLoss and SetProfitLimit running together from a NS script, and MBTrading (live) has a bug.
                    SetProfitLimit immediatly places a limit order with MB.
                    When price triggers a StopLoss, the order is rejected because MB does not allow StopLoss and Limit orders at the same time.
                    The strategy terminates on error and closes the position.

                    For ATM strategies, this bug was fixed in NT7 b8.
                    But apparently not fixed for NS strategies.

                    There is more at issue here because the problem described at the beginning of of this thread was when price triggered the limit order. That resulted in an order duplication.

                    I have sent you an email with log and trace files.

                    Comment


                      #11
                      Camdo,

                      What bug exactly were you referring to that was fixed on B8?
                      Josh P.NinjaTrader Customer Service

                      Comment


                        #12
                        Using MBTrading (live) and Navigator 11.3.0.4
                        It was impossible to place an ATM strategy (custom) order that had a ProfitTarget and Stoploss prior to and including NT 7.0.0.7
                        A simple 1 step 20tick profit, 20 tick stoploss for example.
                        An error message would result same as described below.

                        With NT 7.0.0.8 the ATM custom strategy order worked okay. That was the first time I ever experienced ATM working with MBTrading even with NT6.

                        I have not tried an ATM strategy order with NT 7.0.0.9 I assume it is still working.

                        I noticed that there was no mention of the fix with NT 7.0.0.8 in the release notes.
                        Last edited by Camdo; 02-12-2010, 03:52 PM.

                        Comment


                          #13
                          This should not work. The reason is that doing so would violate regulations since for equities, you can't place opposing orders to protect a position. Through MBT, stops and targets are sent as real orders that route directly to the exchange(s) and thus MBT prevents that from happening since they otherwise, would be in violation. Not sure why it worked recently.
                          RayNinjaTrader Customer Service

                          Comment


                            #14
                            So it should be impossible for ATM to execute a stoploss and profitTarget strategy in a live account with any brokerage firm.

                            The fact is though, that it does work. Have you tried it?

                            NT must be implementing a software solution.
                            1. StopLoss and profitTarget can be simulated. One cancels other before placement.
                            or
                            2. One order can be real and the other simulated. The simulated cancels the real before placement.

                            Comment


                              #15
                              Camdo,

                              We have tried. It did not work as expected.
                              Josh P.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              636 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              366 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              107 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              569 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              571 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X