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 judysamnt7, 03-13-2023, 09:11 AM
    4 responses
    57 views
    0 likes
    Last Post DynamicTest  
    Started by ScottWalsh, Today, 06:52 PM
    4 responses
    36 views
    0 likes
    Last Post ScottWalsh  
    Started by olisav57, Today, 07:39 PM
    0 responses
    7 views
    0 likes
    Last Post olisav57  
    Started by trilliantrader, Today, 03:01 PM
    2 responses
    20 views
    0 likes
    Last Post helpwanted  
    Started by cre8able, Today, 07:24 PM
    0 responses
    9 views
    0 likes
    Last Post cre8able  
    Working...
    X