Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple Limit orders

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

    Multiple Limit orders

    Hello, I am trying to write a strategy which implements brackets of orders. I am seeing errors in my log when I try to create the following 2 orders:

    if(lastFill == 0.0 && okToTrade)
    {
    lastFill = e.Price;
    tierCount = 0;
    upOrder = EnterShortLimit(contractsPerEntry, e.Price + (stop_ticks * TickSize),
    "OpenShort");
    dnOrder = EnterLongLimit(contractsPerEntry, e.Price - (stop_ticks * TickSize),
    "OpenLong");
    }

    where upOrder and dnOrder are IOrder interfaces.

    the logfile says one of the orders is being ignored, which is obvisouly the second order since the first order goes pending. I read in the Help files that this simultaneous limit orders in opposite directions is not possible. Is there a work around for this?

    I am using NT 6.5

    Regards,

    ajhg4

    #2
    Hi ajhg4,

    Looks like you are running in to the Internal Order Handling Rules detailed at the bottom of the page here - http://www.ninjatrader-support.com/H...tml?Overview36

    If this is done in NinjaTrader 6.5, you can only send one, then monitor the price to cancel and send the other.

    In NinjaTrader 7, you can use the unmanaged approach.
    More info at - http://www.ninjatrader.com/support/h...d_approach.htm
    Last edited by NinjaTrader_Tim; 05-18-2010, 09:51 AM.
    TimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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