Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

My Exit Order is not getting filled.

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

    My Exit Order is not getting filled.

    Hello,
    I am using the Sim101 Simulation acct to backtest my Custom strategy.
    // I am entering based on this code. AND THIS WORKS!
    EnterLong("CrossAboveMACD");

    // I am setting my exit target based on this Code. THIS NEVER GETS TRIGGERED. ANY THING WRONG?
    ExitLongLimit(GetCurrentAsk() + 1.00, "CrossAboveMACD");

    I see the price crossing my original GetCurrentAsk() + 1.00 in subsequent bar closes but my exit order never gets triggered.
    I am running this once an hour.
    Please help.
    Sudha

    #2
    Hello sudha,

    If you're checking the price on subsequent bars and it's not triggering, maybe you need ExitOnClose set to false?

    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      My Exit Order is not getting filled.

      Ryan,
      In my backtesting UI Screen, I do have "ExitOnClose" set to "false". The ExitLongLimit() order should stay for the entire session, isn't it?. I have defined my Session begin and Session end as 12am.
      Sudha

      Comment


        #4
        Hi Sudha,

        ExitOnClose shouldn't be preventing your order from triggering here unless it's going across sessions and set to true.

        You might need to set liveUntilCanceled to true. Otherwise it will cancel the order if not filled on the bar it's submitted on. This requires a different overload for the ExitLongLimit()



        ExitLongLimit(int barsInProgressIndex, bool liveUntilCancelled, int quantity,double limitPrice,string signalName,string fromEntrySignal)


        If this isn't the case you may need to look at the condition for exit to be sure it's evaluating true.
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        117 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        166 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        85 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        130 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        88 views
        0 likes
        Last Post PaulMohn  
        Working...
        X