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 helpwanted, Today, 03:06 AM
        1 response
        7 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        7 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by aussugardefender, Today, 01:07 AM
        0 responses
        5 views
        0 likes
        Last Post aussugardefender  
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        242 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        384 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X