Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Orders not launched

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

    Orders not launched

    Hi,

    I am working on undertanding how new orders are launched.
    For that, I have a very simple program:

    protected override void OnBarUpdate()
    {
    if (Position.MarketPosition == MarketPosition.Flat)
    if (CrossAbove(SMA(FastLenght), SMA(SlowLenght), 1)){
    entryOrder = EnterLongStop(1, Close[0] + 0.0003);
    ExitLongLimit(Low[0]);
    }
    }

    From this code I understand a new trade should be launched once the price goes above Close + 0.0003. However, I am taking a look at the chart and I can find many situations where the conditions fulfill the requirements but no traders are launched (an example can be found on the picture).

    May you help me understanding why?
    Attached Files

    #2
    Hello jemoce,

    Thank you for your note.

    Using EnterLongStop will submit an order which will be canceled if its not filled on the bar its submitted to.

    If you use the following EnterLongStop syntex, setting liveUntilCancelled to true, do you see entries where you expect them?

    Code:
    EnterLongStop(int barsInProgressIndex, bool liveUntilCancelled, int quantity, double stopPrice, string signalName)
    https://ninjatrader.com/support/help...erlongstop.htm

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    558 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    324 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
    545 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    547 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X