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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        111 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        59 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        38 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        41 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        78 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X