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 is not running with most futures and forex

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

    Backtest is not running with most futures and forex

    My back-testing wont run on most futures and forex instruments, I have TD connection and have Ninja trade data plan. I can load the instrument chart from the control center (So im getting the data) but when running a backtest on a strategy it wont even start it, the strategy will work with any stock but not on futures and forex. any ideas on how to solve this?



    #2
    Hello vmauvalencia,

    Welcome to the NinjaTrader forums!

    If the strategy is in the Strategy Analyzer, is there data appearing on the Chart Display of the Strategy Analyzer?

    Importantly, are there errors appearing on the Log tab of the Control Center?



    Try testing the Sample MA Crossover strategy included with NinjaTrader on the same chart or Strategy Analyzer using the same instrument, bar type, interval, and date range.

    Do you see results with this strategy? (This would confirm for us data is available and the issue is with the logic in the custom script)



    If the strategy is getting data and the strategy is enabled or a backtest is run with no errors in the Log tab of the Control Center, then would likely indicate the logic conditions did not evaluate as true or orders are being ignored or cancelled.

    In order to better understand how the code is working, it will be necessary to use Print to see how the conditions are evaluating and enable TraceOrders to see if orders are being submitted, ignored, rejected, or cancelled.

    Below is a link to a forum post that demonstrates using prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.

    https://ninjatrader.com/support/foru...121#post791121

    Enable TraceOrders, print the time of the bar and all values used in the conditions that submit entry orders. Include labels for all values and comparison operators.

    Let me know if you need any assistance creating a print or enabling TraceOrders.

    Save the output from the output window to a text file and provide this with your reply.

    I'll be happy to assist with analyzing the output.​
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hello,

      There is no chart being displayed on the strategy Analyzer tab after I run the backtest, however I can load the NQ graph from the control panel.

      I also tried the sample MA strategy but is doing the same, there is no errors on the log, nothing happens when I click run, and again this doesnt happen for some reason on ES futures and all stocks, only with NQ, gold and most other futures and minis.

      Victor,.

      Comment


        #4
        Hello Victor,

        If there is no chart in the Strategy Analyzer there is no data.

        Are you connected to a data feed?

        When you load a chart with the same instrument and interval, is it the same day range?
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by lightsun47, Today, 03:51 PM
        0 responses
        5 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        8 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        44 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        13 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        9 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X