Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

OCO orders question

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

    OCO orders question

    try to sumbit two stop orders in both directions, then cancel the other if one get filled. it seems only allow me to place stop order in one dirction.
    code:
    protected override void OnBarUpdate()
    {
    if (BarsInProgress == 0)
    {
    entryOrderShort=EnterShortStop(0,true,1,close[0]-0.001,"Short");
    entryOrderLong=EnterLongStop(0,true,1,close[0]+0.001,"Long");
    }
    }
    only short orders placed, long orders completely ignored.
    Get below error message:
    Ignored PlaceOrder() method at 1/4/2008 1:00:00 AM: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=1.9720 SignalName=Long' FromEntrySignal='' Reason='An Enter() method to submit an entry order has been ignore. Please search on the term 'Internal Order Handling Rules' in the Help Guide for detailed explanation.'

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

    You should only place one. When price moves closer to the other one, cancel the first and replace it with the other direction.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by alifarahani, Today, 09:40 AM
    6 responses
    27 views
    0 likes
    Last Post alifarahani  
    Started by Waxavi, Today, 02:10 AM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by Kaledus, Today, 01:29 PM
    5 responses
    13 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Started by Waxavi, Today, 02:00 AM
    1 response
    12 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by gentlebenthebear, Today, 01:30 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X