Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest has fewer trades historically than recently?

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

    Backtest has fewer trades historically than recently?

    I'm encountering an error/bug I can't figure out, where I've created an algo and when I run it in backtest it gives fewer trades the farther back in time I go. For example, from Jan of this year until now it shows 44 trades, from Jan of 2013 till now it then shows 23 trades, and from Jan of 2012 until now it shows only 2 trades.

    Also I am running the strategy on NG, but when I run it on GC instead I get a normal progression of trade quantity going back in time. Are you aware of anything that would cause such an issue?

    #2
    Hello LightWeight,

    Your NinjaScript / C# Code will always be logically processed and evaluate according to your set logic - this can of course lead to unexpected results at times, thus we would suggest to simplify and debug your code to better understand the event sequence it would go through - unfortunately we cannot offer such debug or code modification services here, but please see the provided resources below to help you proceed productively :

    First of all you would want to use Print() statements to verify values are what you expect - Debugging your NinjaScript code.

    For strategies add TraceOrders = true to your Initialize() method and you can then view valuable output related to strategy submitted orders through Tools > Output window - TraceOrders

    It may also help to add drawing objects to your chart for signal and condition confirmation - Drawing Objects.
    Cal H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by andrewtrades, Today, 04:57 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Manfred  
    Started by chbruno, Today, 04:10 PM
    0 responses
    5 views
    0 likes
    Last Post chbruno
    by chbruno
     
    Started by josh18955, 03-25-2023, 11:16 AM
    6 responses
    436 views
    0 likes
    Last Post Delerium  
    Started by FAQtrader, Today, 03:35 PM
    0 responses
    7 views
    0 likes
    Last Post FAQtrader  
    Started by rocketman7, Today, 09:41 AM
    5 responses
    19 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X