Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

stop order missed in strategy realtime run

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

    stop order missed in strategy realtime run

    Hi,

    I programmed a strategy. All is good in strategy analyzer but when I run it in realtime, some stop orders missed. When I trace order for exemple I saw :

    19/06/2008 16:01:45 Amended open order: Action=BuyToCover OrderType=Stop Quantity=30 LimitPrice=0 StopPrice=11993 SignalName=StopShort' FromEntrySignal='Vente'

    All seems to be good in output windows but this stop didn't run. I don't understand why ?

    Can you help me ?

    Thanks

    #2
    What you mean missed?

    This trace shows that this stop order was changed in price or size. Is this not expected?
    RayNinjaTrader Customer Service

    Comment


      #3
      The stop appear in output windows but order is not placed. It's very strange.

      Comment


        #4
        Can you trace the first time the order was placed and correlate to the log tab as well to see the order, then follow the log to see what happened.
        RayNinjaTrader Customer Service

        Comment


          #5
          log and trace don't corelate

          Hi Ray,

          I traced Orders in Output window and I look in log. there are differences I don't understand.

          Look at Output window:

          26/06/2008 17:22:25 Entered internal PlaceOrder() method at 26/06/2008 17:22:25: Action=BuyToCover OrderType=Stop Quantity=20 LimitPrice=0 StopPrice=11571 SignalName='StopShort' FromEntrySignal='Vente'
          26/06/2008 17:22:25 Amended matching order: Action=BuyToCover OrderType=Stop Quantity=20 LimitPrice=0 StopPrice=11571 SignalName=StopShort' FromEntrySignal='Vente'

          And log at the same time :

          26/06/2008 17:22:26 Order Order='bfcf794445074755a90c14bc0299cc31/Sim101' Name='StopShort' New State=Accepted Instrument='YM 09-08' Action=BuyToCover Limit price=0 Stop price=11610 Quantity=20 Type=Stop Filled=0 Fill price=0 Error=NoError Native error=''

          The price is not the same.

          Price of 11571 in trace is the good price I want but 11610 is the bad price executed !!!

          Thank you for you help.

          Comment


            #6
            output window says it: there is an order which already existed (at price 11610?) amended to 11571. Please check you output window further up until you see the placement of the order at original price of 11610.

            Comment


              #7
              Here is output windows extract

              26/06/2008 17:19:19 Entered internal PlaceOrder() method at 26/06/2008 17:19:19: Action=BuyToCover OrderType=Stop Quantity=2 LimitPrice=0 StopPrice=11610 SignalName='StopShort' FromEntrySignal='Vente'
              26/06/2008 17:19:19 Amended quantity of remaining exit order: Order='bfcf794445074755a90c14bc0299cc31/Sim101' Name='StopShort' State=PendingSubmit Instrument='YM 09-08' Action=BuyToCover Limit price=0 Stop price=11610 Quantity=10 Strategy='StrategieWoodieCCIProbe2' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='bfcf794445074755a90c14bc0299cc31' Gtd='01/12/2099 00:00:00'
              26/06/2008 17:22:25 Entered internal PlaceOrder() method at 26/06/2008 17:22:25: Action=SellShort OrderType=Market Quantity=10 LimitPrice=0 StopPrice=0 SignalName='Vente' FromEntrySignal=''
              26/06/2008 17:22:25 Amended quantity of remaining exit order: Order='bfcf794445074755a90c14bc0299cc31/Sim101' Name='StopShort' State=Accepted Instrument='YM 09-08' Action=BuyToCover Limit price=0 Stop price=11610 Quantity=20 Strategy='StrategieWoodieCCIProbe2' Type=Stop Tif=Gtc Oco='' Filled=0 Fill price=0 Token='bfcf794445074755a90c14bc0299cc31' Gtd='01/12/2099 00:00:00'
              True
              11610
              11578
              11563
              0
              26/06/2008 17:22:25 Entered internal PlaceOrder() method at 26/06/2008 17:22:25: Action=BuyToCover OrderType=Stop Quantity=20 LimitPrice=0 StopPrice=11571 SignalName='StopShort' FromEntrySignal='Vente'
              26/06/2008 17:22:25 Amended matching order: Action=BuyToCover OrderType=Stop Quantity=20 LimitPrice=0 StopPrice=11571 SignalName=StopShort' FromEntrySignal='Vente'
              26/06/2008 18:11:56 CancelAllOrders: BarsInProgress=0

              The price 11610 is the price of stop order setup just before. But I don't understand why order stop was not changed. In log the stop seems to be changed ?

              Comment


                #8
                It would be changed later. The "Accepted" you posted below just refers to the original order placement.

                This is just a race condition:
                - you placed order at 11610
                - later you changed the price to 11571. However, change could not be applied since broker did not yet report Accepted
                - broker reports Accepted and before NT could apply new price the order was filled by broker

                This could happen.

                Comment


                  #9
                  Output extract run until 18:11 (50 minutes after stop order changed) and I must close position manually because stop order price stay at 11610. When stop order price would changed at 11571 ?

                  Comment


                    #10
                    In post #5 you said order was filled at price 11610. When did that happen?

                    Comment


                      #11
                      How can I do in order to avoid this ?

                      Comment


                        #12
                        Not sure there is anything you could do, since an order always could be filled as you try to change its price. This is the reality of live orders processed/managed by the broker infrastructure.

                        Curious: What broker technology was this? Zen, TT, TDAmeritrade else?

                        Comment


                          #13
                          Order stop at 11610 was not filled. It was just placed. 11571 order stop should have been filled. I don't known at what real time price is the future during stop order at 11571 accepted process.

                          I use Zen-Fire.

                          Comment


                            #14
                            Please make sure you are on latest 6.5.1000.4

                            Comment


                              #15
                              I have it.

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                              0 responses
                              580 views
                              0 likes
                              Last Post Geovanny Suaza  
                              Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                              0 responses
                              335 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by Mindset, 02-09-2026, 11:44 AM
                              0 responses
                              102 views
                              0 likes
                              Last Post Mindset
                              by Mindset
                               
                              Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                              0 responses
                              554 views
                              1 like
                              Last Post Geovanny Suaza  
                              Started by RFrosty, 01-28-2026, 06:49 PM
                              0 responses
                              552 views
                              1 like
                              Last Post RFrosty
                              by RFrosty
                               
                              Working...
                              X