Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

targets exceeded on replay

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

    targets exceeded on replay

    Regardless of the strategy I run, I constantly get profit targets (and sometimes losses) that exceed the target, and sometimes quite significantly. For example, I just ran a scalping strat with a 2 tick target, and out of the 800 winning trades over a month, around 40 of them exceeded the target, sometimes by more than 20 ticks.

    It is predominant with the profts. For example, I just ran a strat for 08-16 on crude, and there were around 25 profits exceeded, ranging from 1 tick up to 25 ticks. On the loss side, there were only 4, and all within 1 or 2 ticks.



    Any idea why this might happen?

    Last edited by Bobbybattles; 12-08-2016, 09:43 AM.

    #2
    Hello Bobbybattles,

    I'm uncertain if the orders filling are real-time or historical.
    Do these orders show in the Historical strategy performance or the Real-time strategy performance?

    Historically (orders that show when the script is first loaded on the chart):

    When using the Default fill algorithm it is possible to get limit order fills outside of the bar.


    However, the orders should still be following the rules of fills, in that the fill price of a buy limit should be at or above the limit price and a sell limit should fill at or below the limit price.

    Are you seeing that the fills are happening outside of the bar or the fills are violating the rules and filling at an invalid price when compared to the submission price of the order.

    If you use the Liberal fill type does this correct the behavior?

    Real-time (orders placed after the market replay playback starts):

    These orders will follow the rules of the simulation engine as if you were placing them with a live feed.
    Are you able to reproduce this behavior when connected to a live feed?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      using normal replay mode, i ran scripts at various speeds. many times, when this happens, the chart will show the fill or entry way above or below the actual bars. there is no specific amount it.

      sorry, but I do not know about if it's liberal. Also, this is real time only, as I am seeing it happen on the charts, and reflected in the strategy summary for real time. This is happening on 2 computers for me.

      Comment


        #4
        I'm working with Battles on this one in person. It's not backtesting so I don't think the liberal vs. default fill algos would apply here. The data is being downloaded from NT directly for market replay data. The issue seems to happen regardless of 1x speed or 500x speed. Platform is NT 7.

        So for example, the strategy shorts at 50.10 CL and target is 4 ticks with a limit order for the take profit so in real life it would pretty much never get filled for anything lower than 50.06 right?

        We've found the strategy analyzer/ backtester to not be reliable so we do all our testing in Market Replay mode which is very time intensive but I think we get better results. Also, any ideas on how to improve testing efficiency within replay mode would be appreciated.

        Thanks for your time.

        Comment


          #5
          Hello Bobbybattles,

          Thank you for confirming the orders are placed after the playback has started and that the orders are appearing the Strategy Performance -> Real-time and are not showing the Strategy Performance -> Historical.

          Real-time orders will follow the same fill rules as orders placed to the Sim101 when a live account is connected.

          Are you able to reproduce this behavior with real-time orders placed when connected to a live data feed on the Sim101?

          What is the submission price of the order (as in Limit price), the order type (as in sell limit), and what is the fill price of the order (Avg. price)?
          This will show in the strategy performance real-time on the Orders display.
          (May I have a screenshot of the strategy performance window showing this order?)
          Chelsea B.NinjaTrader Customer Service

          Comment


            #6
            thanks for the response. As mentioned above, algophy is working with me on this, so if his comments help, thats great.

            I am attaching 3 images. There is the orders from the dashboard, as well as a photo showing the trade entry, then a follow up showing the entry moved, creating the error target.





            Comment


              #7
              Also, here is the orders tab from strat performance. Thank you for your assistance.

              Comment


                #8
                Originally posted by NinjaTrader_ChelseaB View Post
                Are you able to reproduce this behavior with real-time orders placed when connected to a live data feed on the Sim101?
                No we have not put this strategy on live sim yet as we are using replay to test new strategies viability before moving to the next phase (live testing).

                Comment


                  #9
                  Hello Bobbybattles,

                  To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

                  Click here for instructions

                  Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

                  Click here for detailed instruction


                  In the pictures you have taken, I am not seeing any limit orders where the Avg price of a buy order is greater than the limit price or the avg price of a sell limit is less than the limit price.

                  Which order is the order that filled at an invalid price?
                  Chelsea B.NinjaTrader Customer Service

                  Comment


                    #10
                    Attached is the screenshot of the performance tab, and as you can see, I highlighted the orders that exceeded my 4 tick profit target. The other thing we noticed is, these moves enter and exit at the exact same time, so it appears to be very fast moves that cause this to happen.

                    This primarily happens to profits, although there are a few losses that have this as well, also in and out at the exact moment.

                    If its any help, here are the entry types and targets we are currently using.

                    EnterLongLimit(Close[0] - 3 * TickSize);
                    SetStopLoss("", CalculationMode.Ticks, 6, false);
                    SetProfitTarget("", CalculationMode.Ticks, 4);

                    Click image for larger version

Name:	Capture.JPG
Views:	1
Size:	339.2 KB
ID:	881390

                    Comment


                      #11
                      Hello Bobbybattles,

                      The screenshot you have attached does not show specific limit orders that have filled at an incorrect price.

                      Likely, the orders are filling at a valid price, but are at the end of the bar in the historical data as there is no intra-bar information added by default to fill at the exact limit price when using the Default fill type. (You can use the Liberal fill type instead of the Default fill type to have the orders fill at the limit price)

                      A limit order fills at the specified price or better. This means that if the market price is much better than the price of the limit, the limit will fill at the market price. If the fill is on the correct side of the limit, this would be expected behavior.
                      Chelsea B.NinjaTrader Customer Service

                      Comment


                        #12
                        So on a 4 tick target, it's expected to get a 70 tick win? I don't think so.

                        Comment


                          #13
                          Hello Bobbybattles,

                          On a 4 tick target, in historical data, if there is no intra-bar information (meaning you do not have an added 1 tick series for high fill resolution) and you are using the Default fill algorithm and the bar close is 70 ticks above, it would be expected that the limit order would fill at the close price of the bar.

                          You can add intra-bar information for high fill resolution or use the liberal fill type. If you do either of these, do you find that this does not resolve the behavior?
                          Chelsea B.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by rtwave, 04-12-2024, 09:30 AM
                          2 responses
                          20 views
                          0 likes
                          Last Post rtwave
                          by rtwave
                           
                          Started by tsantospinto, 04-12-2024, 07:04 PM
                          5 responses
                          67 views
                          0 likes
                          Last Post tsantospinto  
                          Started by cre8able, Today, 03:20 PM
                          0 responses
                          6 views
                          0 likes
                          Last Post cre8able  
                          Started by Fran888, 02-16-2024, 10:48 AM
                          3 responses
                          49 views
                          0 likes
                          Last Post Sam2515
                          by Sam2515
                           
                          Started by martin70, 03-24-2023, 04:58 AM
                          15 responses
                          115 views
                          0 likes
                          Last Post NinjaTrader_Jesse  
                          Working...
                          X