Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EnterLong doesn't replace EnterLongLimit?

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

    EnterLong doesn't replace EnterLongLimit?

    Hi all,

    Maybe I've been operating under the wrong assumption... but I thought this would work:

    OnBarUpdate() {
    ..
    if (xxx)
    EnterLongLimit();
    else
    EnterLong();
    }

    The idea is that it would be (sort of) a bracketed order. I wanted to try to fill a limit order if possible, but if not, I would enter a market order... and I thought the market order would automatically cancel the limit order.

    But in operation, it doesn't work that way...

    The previous bar:
    9/18/2008 12:50:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Percent Value=0.01 Currency=0 Simulated=False
    9/18/2008 12:50:00 PM Entered internal PlaceOrder() method at 9/18/2008 12:50:00 PM: Action=Buy OrderType=Limit Quantity=100 LimitPrice=11.55 StopPrice=0 SignalName='' FromEntrySignal=''
    9/18/2008 12:50:00 PM Ignore order amendment: Action=Buy OrderType=Limit Quantity=100 LimitPrice=11.55 StopPrice=0 SignalName=Buy' FromEntrySignal='' Reason='Order already has this stop price/limit price/quantity'

    The next bar:
    9/18/2008 12:55:00 PM Entered internal SetStopTarget() method: Type=Stop FromEntrySignal='' Mode=Price Value=0.1 Currency=0 Simulated=False
    9/18/2008 12:55:00 PM Entered internal PlaceOrder() method at 9/18/2008 12:55:00 PM: Action=Buy OrderType=Market Quantity=100 LimitPrice=0 StopPrice=0 SignalName='' FromEntrySignal=''
    9/18/2008 12:55:00 PM Ignored PlaceOrder() method at 9/18/2008 12:55:00 PM: Action=Buy OrderType=Market Quantity=100 LimitPrice=0 StopPrice=0 SignalName='Buy' FromEntrySignal='' Reason='Exceeded entry signals limit based on EntryHandling and EntriesPerDirection properties'
    9/18/2008 12:55:00 PM Cancelled expired order: BarsInProgress=1: Order='NT-00003/Back101' Name='Buy' State=Working Instrument='MBI' Action=Buy Limit price=11.55 Stop price=0 Quantity=100 Strategy='ProtectDown' Type=Limit Tif=Gtc Oco='' Filled=0 Fill price=0 Token='fe75bf7d47f64533b8fd5549649e0e20' Gtd='12/1/2099 12:00:00 AM'
    moving stop..

    #2
    EnterLong() will not cancel your EnterLongLimit(). They are seen as two separate orders which is the way it has been designed. Many people do like to have a limit order in place and if they see something they want to add a market order while keeping their limit order in place. If you want the EnterLongLimit() to cancel you need to just not resubmit it on the next bar and then when it gets cancelled then you can place down your EnterLong() order.
    Josh P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    566 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    330 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    547 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    548 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X