Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest not working

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

    Backtest not working

    Hi,

    Im trying to use strategy analyzer backtest using a demo account that I have connected using all the info sent to me. When i run the backtest it returns all 0's and seems like nothing happened. I'm using one of the basic strategies called SimpleMovingAverageCrossover for ES 06-20 for the last couple of months. I downloaded the historical data from 01/01/2020 to today's date, for ask, bid, and last, at the minute interval. I'm not sure why my backtest isn't working. I didn't connect a brokerage yet which is the only reason i figure it may not be working for me.

    #2
    Hello Andrew12121,

    Welcome to the NinjaTrader Forums!

    To do a backtest you must be connected to a data provider or broker that provides historical data for the instrument in question (or you must have this pre-imported).

    So I may accurately assist you, please answer all of the following questions:
    • What version of NinjaTrader are you using? Please provide the entire version number. This can be found under Help -> About (Example: 7.0.1000.? or 8.0.?.?)
    • Who are you connected to? This is displayed with a green dot in the Connections menu of the Control Center window.
    • (For a chart) what interval is selected? For example, 5 minute, 1 day, 2000 volume, 4 Renko, etc.
    • Do you receive an error on screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello ,

      So i am connected to the personal demo connection continuum, it's green bottom left.

      My version is 8.0.21.1 64-bit.

      the selected interval is 1 minute.

      I don't receive an error, but on the summary page I get 0$ profit/loss. I checked the log in the control center and i don't have any errors.

      When i go to the chart section of strategy analyzer, there is about 5 months of data that appears by minute. The log at the bottom of the strategy analyzer shows zero trades after running the backtest.

      Thanks,

      Comment


        #4
        Hello Andrew12121,

        Below is a link to a video of testing the SampleMACrossover included with NinjaTrader.
        https://drive.google.com/file/d/1NcM...w?usp=drivesdk

        If you follow the same steps as shown in the video are you getting different behavior?

        Are certain you are backtesting the Sample MA Crossover?

        May I have a screenshot of the Strategy Analyzer window?
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi so I tested every strategy and Sample MA Crossover actually works for me, none of the others do however. They show 0$ is every category.

          I just want to make sure that if i build a strategy correctly, it will give me values instead of displaying 0$ .
          Last edited by Andrew12121; 05-12-2020, 12:08 PM.

          Comment


            #6
            Hello Andrew12121,

            The other scripts are showing specific situations.

            As an example the SampleATMStrategy shows how to use Atm Strategy methods. Atm Strategy methods only work in real-time and do not work in the Strategy Analyzer which only uses historical data. Also, this requires that an Atm Strategy with the name "AtmStrategyTemplate" has to exist. See the comments in the code for more information.

            The SampleMultiInstrument requires equity data to load "MSFT" which is added with AddDataSeries() in the code. This is a demonstration of how to add a secondary series. Try using a daily bar with Kinetick End of Day Free.

            The SampleMultiTimeFrame I would expect to work.
            May I have a screenshot of the Strategy Analyzer window after testing the SampleMultiTimeFrame?


            Yes, if you build a strategy correctly and the strategy has conditions that evaluate as true and place orders, then yes there will be performance on the summary.
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              Hello,

              I've run into the exact same issue, I'm connected to TD Ameritrade and I try to backtest "Sample MA crossover" on every single instrument and I'm returned all 0's. I've gone through (~5 hours) and tried back-testing every single combo of instruments and strategies and all outputs are 0.

              I'm really surprised more people haven't run into this issue

              Help

              Comment


                #8
                Hello NeedHelp11,

                Andrew12121 has stated in post #5 that they are getting results when testing the SampleMACrossover.

                If you are not getting results its likely because there is no data.

                May I confirm you are testing an equity with minute or day data?

                There are other users that have had issues with historical data. Often this is from not understanding what data is available with TD Ameritrade.
                Chelsea B.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

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