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 Jonafare, 12-06-2012, 03:48 PM
    5 responses
    3,986 views
    0 likes
    Last Post rene69851  
    Started by Fitspressorest, Today, 01:38 PM
    0 responses
    2 views
    0 likes
    Last Post Fitspressorest  
    Started by Jonker, Today, 01:19 PM
    0 responses
    2 views
    0 likes
    Last Post Jonker
    by Jonker
     
    Started by futtrader, Today, 01:16 PM
    0 responses
    8 views
    0 likes
    Last Post futtrader  
    Started by Segwin, 05-07-2018, 02:15 PM
    14 responses
    1,792 views
    0 likes
    Last Post aligator  
    Working...
    X