Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Mixing Long and Short trades

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

    Mixing Long and Short trades

    Would like to build a strategy for backtesting that involves long and short trades. I'd like to do something as simple as place two entry limit orders, one long and one short, each a certain distance from the current price, and have one cancel the other upon being filled. However, NinjaTrader will not allow long and short limit orders to exist simultaneously, and ignores the second order placed. This is strange and frustrating because this is something a live trader can do manually, so this impossibility in NinjaTrader seems like an unnatural limitation.

    When NT ignores the second order the log reflects this, saying "Please search on the term 'Interal Order Handling Rules' in the Help Guide for detailed information", but this search doesn't turn up anything in either the platform's Help or the Help Guide PDF.
    I would run separate strategies for long and short, but my trading strategy would require that values and variables be shared between the strategies, which I understand also isn't possible. A workaround that would wait for a signal from the data stream to place one order or another is problematic with volatility and getting limit orders into the "queue" as early as possible, especially with backtesting and its low granularity of those signals.

    Is there a better, more effective way to circumvent this long-and-short simultaneous limit order thing ?

    #2
    You cannot place simultaneous working orders in opposite directions.

    The link the message refers to is this one: http://www.ninjatrader-support.com/H...tml?Overview36
    The section pertaining to you is at the bottom.

    To work around this, ONLY submit one order. When price gets closer to the other bracket, cancel the original and submit the other. If the price moves back closer to the first, cancel the second and resubmit the first.

    There is no alternative. You cannot submit working orders in opposite directions. If you want more granularity in your backtesting see this sample: http://www.ninjatrader-support2.com/...ead.php?t=6652
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    93 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    48 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    31 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    34 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    70 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X