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 DanielSanMartin, Yesterday, 02:37 PM
      2 responses
      13 views
      0 likes
      Last Post DanielSanMartin  
      Started by DJ888, 04-16-2024, 06:09 PM
      4 responses
      12 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by terofs, Today, 04:18 PM
      0 responses
      11 views
      0 likes
      Last Post terofs
      by terofs
       
      Started by nandhumca, Today, 03:41 PM
      0 responses
      8 views
      0 likes
      Last Post nandhumca  
      Started by The_Sec, Today, 03:37 PM
      0 responses
      7 views
      0 likes
      Last Post The_Sec
      by The_Sec
       
      Working...
      X