Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtesting not showing all results for time period.

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

    Backtesting not showing all results for time period.

    I have a weird problem. I have a long strategy and a short strategy, they are opposites of each other. When I backtest the long strategy, everything is fine, all the trades show up within a givin time period (say 1/1/2009 - Today). But the short strategy acts weird.

    For my short strategy, If I backtest 1/1/2009 - Today, nothing at all comes up. But if I backtest 4/1/2009 to Today, I get a total of 34 trades that ends at 2/10/10 (All trades closed, no error). Now there are more trades missing after 2/10/10.

    Now If I backtest anywhere from (2/10/2010 - 2/18/2010) - Today, Nothing comes up. But as soon as I search from 2/19/210 to Today I get another 22 trades until 06/14/210 (All trades closed with no error) Again there are still more trades after 06/14/210 if I search from 6-20-2010 till today.

    What is causing this behavior?

    #2
    It sounds like you're running a total of 4 tests - Long, Short, each with different date ranges. Different tests will typically lead to different results as the sequences can change.

    It's best to evaluate strategy functionality for one test at a time, and use the provided debuging tools for this. Use print statements to check all values, and TraceOrders output to track strategy order submission. Help for using these tools is available here.

    If I backtest 1/1/2009 - Today, nothing at all comes up. But if I backtest 4/1/2009 to Today
    This is an interesting result, and you will want to check the conditions for the test that is not working as you expect. Add drawing objects for additional signal confirmation, or even a simple Print("This Condition Occurred!"); when the condition is true will help you track down what is happening with your strategy.
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      I figured out the prpblem. I had some problem with "null" value settings and after fixing it, all the trades show. Thanks.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      85 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      47 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      29 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      32 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      67 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X