Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy Backtest

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

    Strategy Backtest

    I programmed a simple strategy that works in real-time but no matter what options I enable in the strategy analyzer I can not get it to trigger a Buy or Sell order at the tick level. It always buys or sells at the open of the next bar. Is this functionality enabled for the free Ninjatrader 8 Beta with the free continuum real-time quotes? I downloaded historical data with the tick option selected for interval, in the strategy analyzer I have tick replay selected and order fill resolution set to high, type set to tick with a value of 1. And I have Calculate.OnEachTick set inside my strategy source code. Am I missing something? I was expecting to just click a few buttons and Ninjatrader 8 would backtest this correctly but I am wrong, but it might be my own ignorance causing all the problems. This has been frustrating. Thanks for any suggestions

    #2
    I would like to know this also... and for Market Replay... How can I get the market to replay a tick at a time so that I can see how my strategy works in real time. The market replay data seems to be bar by bar - and for strategies that are not designed this way its pretty useless.

    Comment


      #3
      I just found this:

      Comment


        #4
        Hello All4theticks,

        Thanks for your post and welcome to the forums!

        Yes, Ninjatrader8 beta is fully enabled.

        I would like to test your strategy on my end. Please send in to Platformsupport[at]Ninjatrader[dot]com with atten: Paul and a link to this thread in the subject line.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hello reach4thelasers,

          Thanks for your post.

          From your description (bar by bar replay) I suspect you were using historical data for playback and not actual market replay data.

          You can Playback either Market Replay data or Historical tick data. For the most accurate reflection of live market conditions you would want to use Market Replay data. Market replay data holds the exact sequence level I and Level II (Market depth) data and must be recorded by NinjaTrader.

          Here is a link to the Playback connection set-up. You can either record the market replay data your self or download already recorded market replay data from the Ninjatrader market replay server. http://ninjatrader.com/support/helpG.../?set_up12.htm

          Here is a further link to the playback connection which includes the differences between Market replay data and historical data: http://ninjatrader.com/support/helpG.../?playback.htm
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Paul View Post
            Hello reach4thelasers,

            Thanks for your post.

            From your description (bar by bar replay) I suspect you were using historical data for playback and not actual market replay data.

            You can Playback either Market Replay data or Historical tick data. For the most accurate reflection of live market conditions you would want to use Market Replay data. Market replay data holds the exact sequence level I and Level II (Market depth) data and must be recorded by NinjaTrader.

            Here is a link to the Playback connection set-up. You can either record the market replay data your self or download already recorded market replay data from the Ninjatrader market replay server. http://ninjatrader.com/support/helpG.../?set_up12.htm

            Here is a further link to the playback connection which includes the differences between Market replay data and historical data: http://ninjatrader.com/support/helpG.../?playback.htm
            I would appreciate a little more depth in the documentation at that second link about the difference between using replay data and historical data. Some of it seems wrong, carried over from NT 7 documentation.

            Assuming my historical data was downloaded with milliseconds and with last, bid, and ask, the only difference should be the level 2 (DOM) data. Are you actually using levels beyond the bid and ask to calculate the probability of a fill? And does that matter on a very liquid instrument like ES?

            (It is such a pain to download replay data.)

            Thank you,
            Dale

            Comment


              #7
              more testing

              After messing with the strategy options for a while, I noticed that if I kept the "Fill resolution" to high, and the "Type" to Tick, but changed the "Value" to 2 instead of 1, it would throw an error "Order fill resolution series must be a more granular multiple of the main data series. Please choose a lower multiple" , I have my Data series set to 1 minute bars so this should be alright but it gives that error. It seems to think that the Fill resolution set to Tick and value of 1 is equivalent to my main data series of 1 minute bars. If I change the fill resolution to seconds it works correctly but doesn't when I have it set to Tick.

              Comment


                #8
                Dale, there are two things to keep in mind in this scenario. The first is the difference between what you see on the chart and what your strategy sees. Charts are drawn in real time, meaning that they update on a set interval, so it can appear that multiple ticks are painted to your chart at once with a 1-tick series.

                However, your strategy should still have access to the tick-by-tick data, even though the chart is not updating as quickly as the data is available to the strategy. You should see the same issue with multiple ticks painting at once on charts using either Playback data or Historical data on the Playback connection, but both should provide you with tick-by-tick updates under the hood for your strategy to process.
                Dave I.NinjaTrader Product Management

                Comment


                  #9
                  Hello All4theticks,

                  The issue of selecting a higher tick value against time based bars is expected due to potential for bleedover. This is why you were able to change the value when using seconds. So in this case the message, "Order fill resolution series must be a more granular multiple of the main data series" is correct.

                  The intrabar fill issue when selecting 1 tick has been confirmed as a bug and has been assigned a tracking number of NT8-8921.
                  Paul H.NinjaTrader Customer Service

                  Comment


                    #10
                    Thankyou

                    Thank you Paul for looking into this.

                    Comment


                      #11
                      To clarify can a custom strategy backtest in Strategy Analyzer using Market Replay data rather than historical data?

                      Comment


                        #12
                        Hello connorgrant5,

                        Thanks for your post and welcome to the forums!

                        No, market replay data and historical data are not the same format, you would not be able to use market replay data in the strategy analyzer.
                        Paul H.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by r68cervera, Today, 05:29 AM
                        0 responses
                        2 views
                        0 likes
                        Last Post r68cervera  
                        Started by geddyisodin, Today, 05:20 AM
                        0 responses
                        3 views
                        0 likes
                        Last Post geddyisodin  
                        Started by JonesJoker, 04-22-2024, 12:23 PM
                        6 responses
                        34 views
                        0 likes
                        Last Post JonesJoker  
                        Started by GussJ, 03-04-2020, 03:11 PM
                        12 responses
                        3,239 views
                        0 likes
                        Last Post Leafcutter  
                        Started by AveryFlynn, Today, 04:57 AM
                        0 responses
                        6 views
                        0 likes
                        Last Post AveryFlynn  
                        Working...
                        X