Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cancel resting limit order

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

    Cancel resting limit order

    I have 2 opposing strategies I am working on, long and short, that submit good until canceled limit orders if a set of entry conditions are met.

    I plan to eventually add code to cancel limit orders if not filled within X bars. I'd also like to code them to cancel limit orders submitted by strategy A if entry conditions for strategy B are met, and vice versa -- how do I do this?

    Also, would it be better/easier to code these 2 unique strategies as 1 that would handle entries in both directions?

    Thanks for any help or advice,
    J

    #2
    Pepperdog,

    Cross strategy communication is not supported. You can roll your strategies into one, but be sure to understand that you cannot be simultaneously long and short in the market at the same time for the same instrument.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      It is possible to code such behaviour with a static interface.
      You could code a base class containing a static data storage of some kind. In addition this class should implement a kind of access control.
      Your strategies (one for long and one for short) both do inherit from this base class.

      It is still possible to apply these derived strategies to different charts independently but being able to exchange data through the base class.

      A good portion of coding effort would be required.

      Regards
      Ralph

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      627 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      359 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
      562 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      567 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X