Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

ExitLongLimit(0.0) never fills

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

    ExitLongLimit(0.0) never fills

    Hi:

    I set an ExitLongLimit(0.0) on my position, and it never fills.
    evidence: all long trades are exited on close.

    same result with ExitLongLimt(0.0, signalname, entrysignalname).

    if I use ExitLong(signalname, entrysignalname) it fills immediately.

    I enter long positions successfully with EnterLongLimit(size, entrysignalname).

    I set a stop with SetStopLoss.
    I did not SetProfitTarget.

    Why doesn't my limit order ever fill?

    thanks -- Jim : )

    #2
    Hi Jim,

    Thanks for your post.

    The statement ExitLongLimit(0.0) would place a limit at the price of 0. Price would have to travel to 0 (zero) to fill this. You would need to specify the actual price to exit at. Please see: http://ninjatrader.com/support/helpG...tlonglimit.htm

    An ExitLong() will exit immediately as it is a market order and will fill at the convenience of the market, so price is not needed for this type exit

    The EnterLongLimit example does not make sense and would advise that you use the helpguide to create your entry correctly: http://ninjatrader.com/support/helpG...rlonglimit.htm

    Also, it is helpful to review: http://ninjatrader.com/support/helpG...d_approach.htm
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Long Exit order that fills "at or above" specified price

      Hi Paul:

      thanks for the quick answer.

      what long exit order would I use to fill "at or above" a specified price,
      even if the price is already above that specified price when the order is launched,
      and even if the price never touches or penetrates that specified price.

      thanks so much
      -- Jim Alexander

      Comment


        #4
        Hi Jim,

        Thanks for your reply.

        Assuming you are in a long position, with the limits you have specified the only exit would be to use the market exit, ExitLong();.

        I would encourage you to review the helpguide sections below for the ExitlongLimit() and ExitLongStop() and ExitLongStopLimit() as they each provide an example showing where they are set to relative to the entry price:
        http://ninjatrader.com/support/helpG...tlonglimit.htm
        http://ninjatrader.com/support/helpG...itlongstop.htm
        http://ninjatrader.com/support/helpG...gstoplimit.htm
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          minimize exit slippage

          Hi Paul:

          I want my exit order to do this (if at all possible...):
          1. if the price is better than the specified exit price, then fill the order.
          2. if the price is worse than or equal to the specified exit price, then don't fill the order.

          I'm using "CalculateOnBarClose".

          how do I set this up?
          should I be using a SetProfitTarget order to capture this behavior?

          again, thanks so very much for all the quick feedback.

          -- Jim Alexander

          P.S.
          if I use a market order, then if the price is worse than Close[0], then It could "slip" in real-time trading. happens all the time in SIM101.

          if I use an exit stop order, then it turns into a market order if its worse than Close[0], and
          it could "slip" in real-time trading.

          If I use a stop limit order, then it turns into a market order after it penetrates the limit, and it could "slip" in real-time trading. since the limit order never fills, it would seem that this one wouldn't either.

          per your comment "as they each provide an example showing where they are set to relative to the entry price"...
          I was not able to discern any explanation of the "price action path" to trigger the various
          phases of these exit orders in the documentation links you sent. They just tell you how
          to program it, but don't explain much of anything else (except the "tips" are useful for explaining how multiple orders interact with one another). Can you point out "where they are set to relative to the entry price". (I couldn't find it.) and since the context of this inquiry is "exit", you did mean exit price, right?

          Comment


            #6
            Hi Jim,

            Thanks for your reply.

            Yes, I meant exit, thanks.

            In the exit order examples I was referring to , for example in the ExitLongStopLimit:

            if (BarsSinceEntry() > 10 && CrossAbove(SMA(10), SMA(20), 1))
            {
            EnterLong("SMA Cross Entry");
            stopPrice = Low[0];
            }

            // Exits position
            ExitLongStopLimit(stopPrice - (10 * TickSize), stopPrice);


            Observe that the stop price is showing that this order type should be placed below the current price.

            You can set the SetProfitTarget() and SetStopLoss() methods as OCO type orders that will employ as soon as you enter a position and when one or the other of these fills, the other is automatically cancelled.
            http://ninjatrader.com/support/helpG...ofittarget.htm
            http://ninjatrader.com/support/helpG...etstoploss.htm
            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Thanks Paul : )

              I think I got it. thanks so much for hanging with me on this one. -- Jim : )

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by algospoke, Today, 06:40 PM
              0 responses
              9 views
              0 likes
              Last Post algospoke  
              Started by maybeimnotrader, Today, 05:46 PM
              0 responses
              7 views
              0 likes
              Last Post maybeimnotrader  
              Started by quantismo, Today, 05:13 PM
              0 responses
              7 views
              0 likes
              Last Post quantismo  
              Started by AttiM, 02-14-2024, 05:20 PM
              8 responses
              168 views
              0 likes
              Last Post jeronymite  
              Started by cre8able, Today, 04:22 PM
              0 responses
              10 views
              0 likes
              Last Post cre8able  
              Working...
              X