Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

questions about backtesting in NT 7

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

    questions about backtesting in NT 7

    We have programmed a strategy using ninjascript but are having trouble getting the NT backtester to function properly using tick data. We have tick data for the ES (from the CME), but does the NT 7 (vers. 14) backtesting truly allow execution of strategies on a tick by tick basis, or only with 'end-of-bar' signals (i.e. 1 minute bar)?

    Also in regards to the NT 7 backtesting, will you look at the #3 post by 'gg80108' at this link, and tell me if he is incorrect or correct regarding the NT 7 backtesting?
    Hi all, I am having some difficulty using NT's built in backtester. Here's some background. I have a fairly sophisticated position-management based NT7 strategy that scales in and scales out on multiple legs (separate IOrders). The strategy works perfectly fine during forward testing and executes all orders/traders perfectly as to the rules. However every time I run the backtester, over whatever period (1 day, 1 week, 1 month, etc), the backtester takes a lot of time (which I understand) and comes …


    thanks for your time and assistance..

    #2
    sev888, per default OHLCV volume info is used in backtesting for your tick chart interval bar chosen, however you could submit orders also to still finer tick series simulating intrabar fills -

    You can submit orders to different Bars objects. This allows you the flexibility of submitting orders to different timeframes. Like in live trading, taking entry conditions from a 5min chart means executing your order as soon as possible instead of waiting until the next 5min bar starts building. You can achieve this by


    The best way to forward test your strategy is using the down loadable Market Replay data we provider, this will let you trade it against the simulation engine and consider the intrabar formation as you progress through the days forward.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      what about the the #3 post by 'gg80108' at the link above, is he correct regarding his critique of the NT 7 backtesting? or where is he incorrect?

      thanks..

      Comment


        #4
        Please clarify, for sure running replay is more accurate than just backtesting based on OHLCV values, as you would

        a) trade against simulation engine

        b) have intrabar formation access (realtime played back data)

        Thanks
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I clicked on the 'Record for market replay' in the Data tab, so that I could use the market replay as the data feed later. Although when I did in fact later try to use Market Replay with our ninjascript strategy it didn't work, because the Market Replay does not record the overnight hi and low (which is what our ninjascript utilizes to determine where it enters the market, and thus our ninjascript strategy never enters the market since it needs these hi/low parameters). Is there any way for us to get the Market Replay to remember overnight hi/low so I can get it to work with our strategy? Thanks..

          Comment


            #6
            Were you testing this with NT7 or NT 65? NT7 would support replay across session breaks and thus I would believe your overnight high / low should be picked up as needed - the data could be downloaded from our servers now for your convenience as well, so no recording on your own needed anymore for most popular futures contracts and FX spot data.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              1) I'm using NT7 (vers.15), and I am trying to use it on Market Reply data (ES) I recorded last week, but when I run the market replay, it does not show on the SuperDOM the high and low of the overnite session (i.e. the green highlighted price of the high, and the pink highlighted price of low), there are no highlighted hi/low prices (and thus my strategy never enters... what am I doing wrong?

              2) What is the process for downloading market replay data from your servers?
              When I connect via Market Replay connection and select a date (other than a date that I've manually recorded data), the market replay time will advance when I press play, but nothing shows up on the SuperDom... do I need to first download the data?

              Comment


                #8
                sev888,

                1) So did you record 24 / 7 to be sure the data would be included in the record?

                2) Any date / market you want to replay has to be downloaded first by going to File > Utilities > Download Replay Data, for the charts basic L1 data is sufficient for a full populated DOM, L2 is needed as well.
                BertrandNinjaTrader Customer Service

                Comment


                  #9
                  Yes, I did record it for 24/7, I also just downloaded the Market Replay data and then tried to run our strategy on it, but I'm still not getting any entry based on the overnight hi/low (although it does work when I run it on the live simulator each day), any other suggestions on how to get it to work on Market Replay? Thanks..

                  Comment


                    #10
                    So you're custom strategy works as expected in live trading and in backtesting but not in Market Replay with 24 / 7 sessions? Please try the simplistic one attached and see if this take the breakout trades past the priorDayHigh and priorDayLow.

                    Thanks
                    Attached Files
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      Bertrand, Hi

                      Please run the strategy you provided on Market Replay for 4/29. We tried this and no orders were submitted at all -- not on the DOM, or the Chart, or in the Control Center.

                      Also, are Market Replay bars considered "Historical"? In our backtesting code we have the code below commented out and on our Live trading version the code is not-commented out.

                      PHP Code:
                      if(Historical) return; 

                      Comment


                        #12
                        Hi sev888, on ES 3 min Default 24 hrs template I get trades for this, namely as the priorDayHigh @ 92 is broken to the upside for example, please recheck your session template used and replay the 28th.

                        Historical Data is considered historical, live Market Replay data would be considered realtime data.
                        BertrandNinjaTrader Customer Service

                        Comment


                          #13
                          I couldn't get the strategy you gave me to enter the market, but the good news is that I did get my strategy to enter properly in regards to the overnight hi/low, but the bad news is that as soon as my order was actually hit and filled, then NT7 (vers.15) instantly freezes up, and I mean everything freezes, I can't even click on the control center to quit NT... Do you have other users who have similar freezing up of NT when running strategies on Market Replay? Suggestions on how to fix? Thanks..

                          Comment


                            #14
                            Let me amend that last post, I just retried it, and this time did not have the Market Replay going at 100x speed, and NT did not freeze up this time... looks like it only freezes when it enters on a fast speed..

                            Comment


                              #15
                              Scratch that, I just tried running it again on the same date, at regular speed (1x), and NT just froze up again, completely frozen... Is this a NT7 glitch or can you suggest what is going on and how to remedy it? Thanks..

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by bortz, 11-06-2023, 08:04 AM
                              47 responses
                              1,610 views
                              0 likes
                              Last Post aligator  
                              Started by jaybedreamin, Today, 05:56 PM
                              0 responses
                              9 views
                              0 likes
                              Last Post jaybedreamin  
                              Started by DJ888, 04-16-2024, 06:09 PM
                              6 responses
                              19 views
                              0 likes
                              Last Post DJ888
                              by DJ888
                               
                              Started by Jon17, Today, 04:33 PM
                              0 responses
                              6 views
                              0 likes
                              Last Post Jon17
                              by Jon17
                               
                              Started by Javierw.ok, Today, 04:12 PM
                              0 responses
                              16 views
                              0 likes
                              Last Post Javierw.ok  
                              Working...
                              X