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 Stanfillirenfro, Today, 07:23 AM
    8 responses
    23 views
    0 likes
    Last Post Stanfillirenfro  
    Started by DayTradingDEMON, Today, 09:28 AM
    2 responses
    15 views
    0 likes
    Last Post DayTradingDEMON  
    Started by navyguy06, Today, 09:28 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    8 responses
    32 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by helpwanted, Today, 03:06 AM
    2 responses
    22 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Working...
    X