Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Automating Backtests in NinjaTrader or Python

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

    Automating Backtests in NinjaTrader or Python

    Hello NinjaTrader Community,

    I hope this post finds you well. I'm currently working on a project where I need to run a large number of backtests. For efficiency, I'm looking to automate this process and I'm exploring two possible routes:
    1. Automating backtests in NinjaTrader: Is there any way to automatically run a backtest in NinjaTrader using a script or command line interface?
    2. Backtesting in Python with NinjaTrader's market data: Alternatively, I'm considering running the backtests in Python using market data exported from NinjaTrader. Has anyone done something similar and could share some insights? Specifically, I'm interested in the process of exporting the data from NinjaTrader in a format that can be easily read by Python, and any challenges that might come up when using this data for backtesting in Python.

    Any guidance, insights, or references would be highly appreciated.

    Thank you in advance for your help. I look forward to hearing your thoughts and suggestions.

    Best regards, Aviram Y.
    Aviram Y
    NinjaTrader Ecosystem Vendor - Aviram Y

    #2
    Hello Aviram,

    Thank you for your post.

    There is no documented/supported way to automate backtests in NinjaTrader. You could look into writing a script or backtesting in Python at your own discretion, though NinjaTrader would not be able to guarantee the results. That said, if you are looking to run tests on multiple instruments at a time there is a way to perform basket tests in the Strategy Analyzer:I understand if that information is not relevant for your testing needs, I just thought I would mention it in case it helps out. As for exporting data, we have a page about how to export historical data here:The way files are formatted for different data types is explained here:If you have any other questions, we would be glad to provide additional resources if they exist. Otherwise, this thread will remain open for other members of the forum community to chime in with their insights and tips.

    Please let us know if we may be of further assistance.

    Comment


      #3
      Thank you for the quick reply! i will look into everything.
      Aviram Y
      NinjaTrader Ecosystem Vendor - Aviram Y

      Comment


        #4
        Please check a new connector I built for Nt8 Pythonbridge, for trading and data collection.

        Comment


          #5
          Hello offpista,

          Unfortunately, I've had to remove the link from your post.
          To ensure a fair forum environment that isn't filled with advertisement, our policy is to remove links to third party sites that are not educational.
          It can helpful to discuss a vendor product, however if you have links to non-educational material such as product sites please consider sending these as a private message to the recipient.​
          If this is an open source script you have created, you may also consider submitting the script to the User App Share.
          Chelsea B.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          558 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          324 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          101 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          545 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          547 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X