Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Backtest Time frame problem

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

    Backtest Time frame problem

    I have similar problems for several different products and scripts, the problem emerged a few weeks ago. 1 minute bars, 20 minimum bars I run a ES backtest on script X from year 2000 to today. First trade is in 2000, there are several trades every year. Same product and script from year 2005 to today. Strangely the first trade is in 2011 and not in 2005. Starting year 2001, first trade is in 2011 again. Similar problem for CL.

    #2
    Hi markus1000,

    The best next step would be to print the variable values that you are checking in your conditions to find why the strategy is behaving as it is.

    In the print, include the time of the bar.

    For example:

    Print(Time[0]+" - Close[0]: "+Close[0]+" > Open[0]:"+Open[0]);
    if (Close[0] > Open[0])
    {
    EnterLong();
    }

    Prints will go to the Output window. (Tools -> Output Window...)
    http://www.ninjatrader.com/support/h.../nt7/print.htm
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      ok found the problem, the historical data of a stock i use for an indicator in the code was messed up.

      Comment


        #4
        Thanks for letting us know Markus
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by PeakTry, Today, 10:49 AM
        0 responses
        1 view
        0 likes
        Last Post PeakTry
        by PeakTry
         
        Started by llanqui, Today, 10:32 AM
        0 responses
        2 views
        0 likes
        Last Post llanqui
        by llanqui
         
        Started by StockTrader88, 03-06-2021, 08:58 AM
        45 responses
        3,992 views
        3 likes
        Last Post johntraderuser2  
        Started by TAJTrades, Today, 09:46 AM
        0 responses
        8 views
        0 likes
        Last Post TAJTrades  
        Started by rhyminkevin, Yesterday, 04:58 PM
        5 responses
        62 views
        0 likes
        Last Post dp8282
        by dp8282
         
        Working...
        X