Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Why my stop didnīt execute?

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

    Why my stop didnīt execute?

    Hello.

    In first time, sorry for my English level, itīs some bad.

    I have the next problem: in my strategy I enter on market with long position on day 16 bar. You can see the picture:



    EnterLong(DefaultQuantity, "Pos_Long");
    stoplevel_alcista = Low[2]-filtro;
    EnterShortStop(DefaultQuantity,stoplevel_alcista," Pos_Short");

    Long order is executed the previous day with BarOnClose active, so is executed on day 16 open at 46.26, itīs ok. Also, a stop reverse order is executed at same time at 44.56. I supose than stop order is not ejecuted at 16 day because both orders are evaluated at same time (Iīm not sure), but I didnīt understand why stop executes on bar 18 and not in bar 17.

    Could someone explains me where I mistaking?

    Thanks

    Regards,

    Andres

    #2
    Hello andriuking,
    Welcome to the forum and I am happy to assist you.

    You have used Enter() method to place your stop order which will be rejected by the internal order handling rules. To place a stop please use the ExitLongStop method. Please refer to our help guide to know more


    Also I would suggest to append the code TraceOrders = true, in the Initialize section of your code. This will provide you with the exact reasons for any internal order rejection. Please refer to this post for more debugging tips
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Thanks Joydeep for your suport!

      Originally posted by NinjaTrader_Joydeep View Post

      You have used Enter() method to place your stop order which will be rejected by the internal order handling rules. To place a stop please use the ExitLongStop method. Please refer to our help guide to know more
      I donīt want a stop, I want reverse the order at this stop price, so I use EnterShortStop(), is not right? how can I do it?

      I will check the information you provides me.

      Thanks

      Comment


        #4
        Please provide us with the TraceOrders output and we can help you determine exactly what is occurring and give you steps to resolve.

        I look forward to assisting you further.
        MatthewNinjaTrader Product Management

        Comment


          #5
          Originally posted by NinjaTrader_Matthew View Post
          Please provide us with the TraceOrders output and we can help you determine exactly what is occurring and give you steps to resolve.



          Thanks

          Comment


            #6
            Hello andriuking,
            The internal order handling rules are rejecting the orders. To know exact reason please append the below code in the Initialize section of the code.

            Code:
            TraceOrders = true;


            You can get the messages in the output window (In Control Center menu bar click on Tools>Output Window).

            Please provide us the TraceOrders output so that we can determine the exact reason for the order rejection.
            JoydeepNinjaTrader Customer Service

            Comment


              #7
              I only put until 26/01/2007 because is too long.

              Appears that comment at 16, when orders dont execute: "**NT** A SellShort stop order placed at '16/01/2007 20:30:00' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy."



              15/01/2007 20:30:00 Entered internal PlaceOrder() method at 15/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Market Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              15/01/2007 20:30:00 Entered internal PlaceOrder() method at 15/01/2007 20:30:00: BarsInProgress=0 Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=44,56 SignalName='' FromEntrySignal=''
              15/01/2007 20:30:00 Ignored PlaceOrder() method: Action=Sell OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=44,56 SignalName='' FromEntrySignal='' Reason='This was an exit order but no position exists to exit'
              16/01/2007 20:30:00 Entered internal PlaceOrder() method at 16/01/2007 20:30:00: BarsInProgress=0 Action=SellShort OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=44,56 SignalName='Pos_Short' FromEntrySignal=''
              **NT** A SellShort stop order placed at '16/01/2007 20:30:00' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
              16/01/2007 20:30:00 Ignored PlaceOrder() method at 16/01/2007 20:30:00: Action=SellShort OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=44,56 SignalName=Pos_Short' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              17/01/2007 20:30:00 Entered internal PlaceOrder() method at 17/01/2007 20:30:00: BarsInProgress=0 Action=SellShort OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=44,56 SignalName='Pos_Short' FromEntrySignal=''
              18/01/2007 20:30:00 Entered internal PlaceOrder() method at 18/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              18/01/2007 20:30:00 Ignored PlaceOrder() method at 18/01/2007 20:30:00: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName=Pos_Long' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              19/01/2007 20:30:00 Entered internal PlaceOrder() method at 19/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              19/01/2007 20:30:00 Ignored PlaceOrder() method at 19/01/2007 20:30:00: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName=Pos_Long' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              22/01/2007 20:30:00 Entered internal PlaceOrder() method at 22/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              22/01/2007 20:30:00 Ignored PlaceOrder() method at 22/01/2007 20:30:00: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName=Pos_Long' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              23/01/2007 20:30:00 Entered internal PlaceOrder() method at 23/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              23/01/2007 20:30:00 Ignored PlaceOrder() method at 23/01/2007 20:30:00: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName=Pos_Long' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              24/01/2007 20:30:00 Entered internal PlaceOrder() method at 24/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              24/01/2007 20:30:00 Ignored PlaceOrder() method at 24/01/2007 20:30:00: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName=Pos_Long' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              25/01/2007 20:30:00 Entered internal PlaceOrder() method at 25/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              25/01/2007 20:30:00 Ignored PlaceOrder() method at 25/01/2007 20:30:00: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName=Pos_Long' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              26/01/2007 20:30:00 Entered internal PlaceOrder() method at 26/01/2007 20:30:00: BarsInProgress=0 Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName='Pos_Long' FromEntrySignal=''
              26/01/2007 20:30:00 Ignored PlaceOrder() method at 26/01/2007 20:30:00: Action=Buy OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=0 SignalName=Pos_Long' FromEntrySignal='' Reason='Invalid order price, please see log tab'
              Last edited by andriuking; 08-22-2012, 12:24 PM.

              Comment


                #8
                Hello andriuking,
                Thanks for the information.

                A sell stop order must be equal or less than the last traded price. If not, the sell stop order will be rejected.

                Please edit your strategy and make sure the stop price is less than the last traded price.

                16/01/2007 20:30:00 Entered internal PlaceOrder() method at 16/01/2007 20:30:00: BarsInProgress=0 Action=SellShort OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=44,56 SignalName='Pos_Short' FromEntrySignal=''
                **NT** A SellShort stop order placed at '16/01/2007 20:30:00' has been ignored since the stop price is greater than or equal to close price of the current bar. This is an invalid order and subsequent orders may also be ignored. Please fix your strategy.
                16/01/2007 20:30:00 Ignored PlaceOrder() method at 16/01/2007 20:30:00: Action=SellShort OrderType=Stop Quantity=1 LimitPrice=0 StopPrice=44,56 SignalName=Pos_Short' FromEntrySignal='' Reason='Invalid order price, please see log tab'
                JoydeepNinjaTrader Customer Service

                Comment


                  #9
                  I understand now... So it executes at 18 bar (because the 17 bar closes over the order price) and donīt executes at 17 (because the 16 bar close below the order price).

                  Thanks very mucha for your help!

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Waxavi, Today, 02:10 AM
                  0 responses
                  1 view
                  0 likes
                  Last Post Waxavi
                  by Waxavi
                   
                  Started by TradeForge, Today, 02:09 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post TradeForge  
                  Started by Waxavi, Today, 02:00 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post Waxavi
                  by Waxavi
                   
                  Started by elirion, Today, 01:36 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post elirion
                  by elirion
                   
                  Started by gentlebenthebear, Today, 01:30 AM
                  0 responses
                  4 views
                  0 likes
                  Last Post gentlebenthebear  
                  Working...
                  X