Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Order Cancellation Error

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

    Strategy Order Cancellation Error

    Greetings,

    I'm getting an error when running a strategy.

    This is the error and then the strategy aborts:

    Code:
    Strategy 'BarColorChgv3/9af7fe1e928940c493459c05fbc39b36' attempted to cancel an order with ID '096be071ae37478c8a382f2e1f57bd8f' however, NinjaTrader has not yet received cancellation confirmation from your broker. Please check your account orders and position and take appropriate action.
    Thanks for your help.

    #2
    David, any connection loss you see prior to this error? Which broker and NT version are you using? Best would be if you'd sent us full trace and logs to review via the Help > Mail to Support route. Thanks

    Comment


      #3
      The problem seems to be similar to the ones shown in the forum concerning reversing or scalling out of multiple orders.

      I have seen several posts about this but I have not seen a solution.

      Here is what happens:

      The code executes a trade with multiple orders and targets.
      Then when it reverses, the opposite position is taken.

      When this code is executed in a Market Replay environment, it WORKS. But when it is attempted in a 'realtime' environment, the errors occur saying there is a 'OVERFILL' error and the strategy is disabled.

      Code:
      private void GoLong()
      	{
      	SetProfitTarget("target1", CalculationMode.Price, Close[0] + (Target1*TickSize));
      	SetProfitTarget("target2", CalculationMode.Price, Close[0] + (Target2*TickSize));
      	SetProfitTarget("target3", CalculationMode.Price, Close[0] + (Target3*TickSize));
      
      		EnterLong("target1");
      		EnterLong("target2");
      		EnterLong("target3");
      	}
      This is the code to go short.

      Code:
      private void GoShort()
      	{
      	SetProfitTarget("target1", CalculationMode.Price, Close[0] - (Target1*TickSize));
      	SetProfitTarget("target2", CalculationMode.Price, Close[0] - (Target2*TickSize));
      	SetProfitTarget("target3", CalculationMode.Price, Close[0] - (Target3*TickSize));
      
      		EnterShort("target1");
      		EnterShort("target2");
      		EnterShort("target3");
      	}
      It appears that the code uses valid code but for some reason it will not work in a realtime environment.
      (I have only tried this in NT7)

      If you can give me any enlightenment on the subject it would be appreciated.
      Or if there is a different way to accomplish the reversal with targets without the error.

      Thanks

      Comment


        #4
        Hi David, have you checked with TraceOrders if the target prices are calculated as you would expect (TickSize setup ok?)?

        Please also let me know if you refer to trying it on a sim or live account in realtime, as there are currently known issues placing trades from NinjaScript strategies on a live account as per the release info we issued.

        Comment


          #5
          I must have missed the release of that info.

          Do you have a link?

          Thanks

          Comment


            #6
            It would be shown as you attempt to download NT7 from our offical page for it -

            Known Critical Issues

            #1 – Basic Entry and FX Pro Order Grid: Please DO NOT modify order prices within these grids. Doing so will result in unsolicited order price changes to other orders displayed in this grid.

            #2 – NinjaScript Strategies: Please DO NOT run automated NinjaScript strategies on a live account as doing so can result in live order prices not correctly amended to reflect the prices coded in the strategy.

            #3 – 3rd Party NinjaScript Components – Please DO NOT install any 3rd party indicators and/or strategies at this time.

            We are working on resolving these issues and will report back when they are resolved,

            Comment


              #7
              Thanks,

              I've been on the beta list for sometime now.

              I'm running this on a live account in simulation mode.
              Does that also apply?

              Could that be the problem I'm having with the orders since it seems to work on Market Replay?

              Comment


                #8
                David, all strategy related live order submission would be impacted.

                The overall issue should be resolved for our next update B14.
                Last edited by NinjaTrader_Bertrand; 04-09-2010, 08:46 AM.

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by NullPointStrategies, Today, 05:17 AM
                0 responses
                43 views
                0 likes
                Last Post NullPointStrategies  
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                124 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                65 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                42 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                46 views
                0 likes
                Last Post TheRealMorford  
                Working...
                X