Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Limit order not working

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

    Limit order not working

    Hi everybody,

    I have a very rough time with the orders learning curve in Ninja. I have a long position I am trying to take profit on 3 , 6 , and 12 ticks limit order. It doesn't work. I do not want to use the Set method in the initialize method because I have problem with other orders that seems to be conflicting...

    Here is my code for the take profit target. What am I doing wrong ?

    if(Position.MarketPosition == MarketPosition.Long){

    ExitLongStop(Position.AvgPrice - (StopLoss * TickValue));

    ExitLongLimit(Position.AvgPrice +(3*TickSize),"MySignal1");
    ExitLongLimit(Position.AvgPrice+(6*TickSize),"MySi gnal2");
    ExitLongLimit(Position.AvgPrice+(12*TickSize),"MyS ignal3");

    }


    Thank you

    Bernard

    #2
    Hi Bernard, it is possible to see if/why orders were ignored by using TraceOrders. You can set TraceOrders = true; in initialize. This link will take you to a wonderful post by Josh that describes how to use this tool.

    In addition, you may want to check the logs (right-most tab in Control Center) and see if there are any order related errors.

    If TraceOrders and the logs don't reveal any information, would it be possible for you post a more complete code sample?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Austin

      Thank for the answer. I will take a look at it but I have found my problem. It was with the signal name. I just copy it from my entry to my exit and it worked. Maybe it was a space or something like that I couldn't see because it seemed to me that the text was identical.



      Thank you

      Bernard

      Comment


        #4
        Glad you got it figured out. You might still want to review the TraceOrders page I sent you--it contains some good information that can come in handy in the future.
        AustinNinjaTrader Customer Service

        Comment


          #5
          Other problem

          Austin

          Thank you for the reply. I used the Trace method to help me debug an old problem. My problem is the following :

          I should have trigerred an order to get long at 996.50 on ES today. With the help of Trace method I have found out the following message :

          Ignore order amendment Reason : 'Order already has this stop/price/limitprice/quantity'

          Is it the problem or is there a set up somewhere that doesn't fill order when it is the low for example. It happens to be the low where my order price was placed but no fill !


          Thaks

          Bernard

          Comment


            #6
            Bernard, what that reason means is that your strategy tried to amend an order with the same exact properties it already had, therefore an amendment isn't necessary because nothing needs to be changed.

            I'm thinking this was a fill issue. Just because the price touched the order doesn't mean the order will execute.

            You can backtest with a different fill algorithm if you'd like. From the backtest window -> Historical Fill Processing -> Fill type -> Liberal.
            AustinNinjaTrader Customer Service

            Comment


              #7
              Issue resolved

              Austin

              Thank you so much. That was the problem... Liberal



              Bernard

              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