Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Simple Backtesting Question

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

    Simple Backtesting Question

    I have developed an intraday trading strategy with a couple of entries on 1-minute chart for a one instrument (mini future ES contract). It seems to work fine... However, then I try to back-test it, against historical data using the Strategy Analyzer, it will only show results in 1 day or session. I tried specifying the date range, but it still returns it only for one day anyway.

    I specify date range from 13/12/2010 to 17/12/2010 (one week). I get results for 17/12/2010 only.

    - Are there certain parameters I am not setting? Do I have to be connected to a specific connection?

    The weird thing is that when I play the data back using the replay connection - and just watch it on a chart - it will execute for every single day (but it takes a lot of time).

    A couple of screenshots attached - you can see parameters specified for the date range, but the orders are only executed on the 17th (one day only).

    Any help is much appreciated. Thank you!!
    Attached Files

    #2
    roberto76, do you have data for those other dates? If so, can you please post the code you're using so we can take a look?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Source Code Included/Attached

      Yes, I believe I definitely have data - when I use the market replay mode across all five days, add a chart and watch my strategy work, one minute by one minute bar - it works just fine. I end up with two entries and two exits for every day - 13th to 17th. Also, If I move the replay bar to another day - it will generate entries for that particular date. I have also tried to back test with a strategy that is included by default, SimpleMACrossOver and it works the same way, so I don't believe it's the code.

      At any rate, here is the source code included - any help would be much appreciated.

      Thank you.
      Attached Files

      Comment


        #4
        Hello roberto76,

        Are you running the backtest in replay mode? The replay will hide any data beyond the date indicated in the replay controls. What happens when you run the backtest against historical data, but not in replay mode?
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          Simple Backtest Question

          Yes, I try to run the strategy in a replay mode. I actually get a different behaviour that replay will hide anything after the date indicated in the replay controls, but it will also hide anything before that particular date. (it may not hide it - but backtesting will not run over that timeframe). Is this expected behaviour? Is the software supposed to be used for backtesting in replay mode? or not? Do you have to have any connection at all?

          When I am not in replay mode - I get no results at all - zero trades. This makes me think that I may not have historical data.

          So, can we clarify:

          - What I do is use the Kinetick free end of day market data and download it each night (using "Utilities->download market data").
          - I do try to get historical data from the historical data manager - but it fails without an error message (probably because I don't have a subscription, so that is fine)
          - So, once I have the data for 5 days (like I did for last week), I was under the impression that I can backtest against that. Is that correct? When I try - I get results for one day, and I can only do it in replay mode? (otherwise, I don't get any trades).

          Can free daily data be used for backtesting? Or just for replay?

          Thanks!

          Comment


            #6
            Hello roberto76,

            Unfortunately the replay data will not work for backtesting. Market replay data is not considered historical data, which is required for the strategy analyzer.

            You can use the kinetick end of day connection for backtesting on daily bars, but will have to connect first to retrieve it. File > Connect > Kinetick - End of Day (Free).
            Ryan M.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by helpwanted, Today, 03:06 AM
            1 response
            12 views
            0 likes
            Last Post sarafuenonly123  
            Started by Brevo, Today, 01:45 AM
            0 responses
            9 views
            0 likes
            Last Post Brevo
            by Brevo
             
            Started by aussugardefender, Today, 01:07 AM
            0 responses
            5 views
            0 likes
            Last Post aussugardefender  
            Started by pvincent, 06-23-2022, 12:53 PM
            14 responses
            242 views
            0 likes
            Last Post Nyman
            by Nyman
             
            Started by TraderG23, 12-08-2023, 07:56 AM
            9 responses
            387 views
            1 like
            Last Post Gavini
            by Gavini
             
            Working...
            X