Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The name 'CancelOrder' does not exist in the current context

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

    The name 'CancelOrder' does not exist in the current context

    Hi

    I'm trying to use the CancelOrder command as defined in the documentation (http://www.ninjatrader.com/support/h...ancelorder.htm)

    Whenever I try to use it - in an indicator or a strategy, I get "the name 'CancelOrder' does not exist in the current context.

    Is there a specific namespace I need to include for this?

    Thanks

    Peter

    #2
    Should just work from a strategy as its strategybase method. However I could see how you would get this error from an indicator, as it is not an indicator base method.

    If you want to manage orders from an indicator, you'll have to use the core level accounts class:



    If you're getting orders related to the strategybase CancelOrder() from a strategy, can you provide an example so I may look into?
    MatthewNinjaTrader Product Management

    Comment


      #3
      Thanks for that - it was the Account Class I needed.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by kinfxhk, 07-13-2026, 10:18 AM
      0 responses
      28 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 09:50 AM
      0 responses
      17 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-13-2026, 07:21 AM
      0 responses
      24 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by kinfxhk, 07-11-2026, 02:11 AM
      0 responses
      22 views
      0 likes
      Last Post kinfxhk
      by kinfxhk
       
      Started by SalmaTrader, 07-07-2026, 10:26 PM
      0 responses
      137 views
      0 likes
      Last Post SalmaTrader  
      Working...
      X