Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Backtest strategy on historical data

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

    Backtest strategy on historical data


    Hi

    Is there a way to back test my strategy on past data using the downloaded historical data and not market replay data?

    Thanks

    #2
    Hello,

    Thanks for your post.

    In NinjaTrader7 the only options for historical review of the strategy performance is to apply to any chart and observe the performance over the duration of the chart or use the File>new>strategy analyzer.

    in the case of the chart, after applying the strategy to it, right mouse click on the chart and select Strategy Performance>(name of strategy)>Historical, which will generate the performance report of the historical gtrades that would have been made.

    For the strategy analyzer, please see: https://ninjatrader.com/support/help...y_analyzer.htm

    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Hello

      I tried to use the strategy analyzer but i'm not completely sure I understand how it works. Basically, what I want is to run my strategy on every tick between 2 specific dates in the past. How can I accomplish that?

      Thanks

      Comment


        #4
        Hello,

        Thanks for your reply.

        Please review the help guide's video tutorial on the strategy analyzer: https://ninjatrader.com/support/movi...A-Strategy.htm

        For your strategy to run in the strategy analyzer "on each tick", you will need to add a 1 tick series to your strategy. You will also need to ensure that you have 1 tick data over the duration of the 2 specific dates.
        Paul H.NinjaTrader Customer Service

        Comment


          #5
          Hello

          This is what I did:

          1. Connected to market replay and paused it on a specific date (21-SEP-2018)
          2. From the file tab I started a new Market Analyzer
          3. I set my data series and time frame (from and to dates) to my strategy and pressed the backtest button

          Instead of running my strategy on the specific time frame, it ran all the way from the beginning of my historical data (somewhere on 2017) until the paused date(21-SEP-2018)

          Comment


            #6
            Hello,

            Thanks for your reply.

            Please post a screenshot of the strategy analyzer settings panel showing all of the information.

            Paul H.NinjaTrader Customer Service

            Comment


              #7
              Attached screenshot
              Attached Files

              Comment


                #8
                Hello,

                Thanks for your reply.

                Please write into PlatformSupport[at]Ninjatrader[dot]Com, mark the e-mail atten:Paul and please include a link to this thread for reference.
                In the e-mail, please include your strategy source code file and a brief description of what it does. The source code file of the strategy will be named as you named it will be found in Documents>NinjaTrader7>bin>Custom>Strategies> the file will have a .CS extension, just add the file to your e-mail.


                Paul H.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by algospoke, 04-17-2024, 06:40 PM
                6 responses
                49 views
                0 likes
                Last Post algospoke  
                Started by arvidvanstaey, Today, 02:19 PM
                4 responses
                11 views
                0 likes
                Last Post arvidvanstaey  
                Started by samish18, 04-17-2024, 08:57 AM
                16 responses
                61 views
                0 likes
                Last Post samish18  
                Started by jordanq2, Today, 03:10 PM
                2 responses
                9 views
                0 likes
                Last Post jordanq2  
                Started by traderqz, Today, 12:06 AM
                10 responses
                21 views
                0 likes
                Last Post traderqz  
                Working...
                X