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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      51 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      142 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      275 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X