Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Historical data / Esignal data – Strategy Analyser mismatch

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

    Historical data / Esignal data – Strategy Analyser mismatch

    Scenario background:

    I am using Esignal as a data provider. I have imported data for backtesting purposes. I am reviewing backtesting on currencies – in this case AUD/USD (or $AUDUSD).

    I have successfully imported 60 days (26-02-2009 – N.B. Date in UK format) of 1 minute bar data. That is, NinjaTrader says I have successfully imported this data. When I load this data on a chart I shows that data as expected and seems to align with the data from the Esignal connection / servers.

    I then do a backtest of a strategy with this the imported historical data, the strategy takes no trades and there is no output to the NT output window. I then run the strategy across the Esignal connected data, across exactly the same data and dates and the same strategy takes 19 trades.

    Question:

    Has anyone had any experience of this behaviour? Is there something I am missing from a strategy set-up point of view for testing historical / imported data? Is it different than testing to data from another data source (e.g. Esignal).

    Thanks and regards,

    Dan

    #2
    Dan, do you see any errors in your Log tab? Have you tried comparing components of the strategy (indicators?) on both datasets checking for consistency?
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Bertrand,

      Thank you for your reply.

      On the first item, no I’m not seeing any errors. On the second item, as per my original post, I am running the strategy across the an exactly same subset of the data and the strategy is behaving in different ways as detailed below.

      Kind regards,

      Dan

      Comment


        #4
        Have you tried exporting the data again to doublecheck it? Is this happening for a specfic symbol only?
        BertrandNinjaTrader Customer Service

        Comment


          #5
          Bertrand,

          Thank you for the suggestion.

          Yes, I have exported the data once it has been imported. It seems to align correctly with the file that I originally imported.

          Kind regards,

          Dan

          Comment


            #6
            Dan, did you test this also with the SampleMACrossover strategy we provide per default? If you like you can send me the data with YouSendIt to support at ninjatrader dot com and I'll try to reproduce this.
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Bertrand,

              Thank you for the good suggestion. I've now tested the SimpleMACross stategy. It seems to execute closely to that of the "live" data.

              The strategy I have been backtesting unsuccessfully involves date and time checking. Is there any complication in that area I should be aware of when testing historical imported data? Some confusions on time / date stamps of data?

              Thanks,

              Dan

              Comment


                #8
                Dan,

                There are no "complications" per se. You just need to make sure you are programming with proper time/date checks that are valid for your backtest.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Bertrand,

                  Thanks for the reply.

                  The strategy I am backtesting runs on 1 or 5 min data. However, is uses a second timeframe of daily data to look at other factors (e.g. daily ATR). The strategy isn’t even firing the OnBarUpdate() event. The code does not appear to execute past the Initialise() function. Obviously, this is the function where I use the Add() function to add the second daily timeframe i.e. Add(PeriodType.Day, 1);.

                  When working in a multiple timeframe strategy, does imported historical 1 min data rollup to daily data? I have some documentation in the help topic: “How does NinjaTrader build Chart Bars?” that daily data is built from daily bars only. This is funny, what is accessed when I access “real time” or “connected data” (which term does NT use internally for this – I will use that one in future?) when I am using a strategy that executes on a second timeframe of daily?

                  Is there a workaround here? For example, would imported daily data (with the same instrument name) accessed by the strategy?

                  From this documentation it would appear that NT is not using the timeframe I am executing the strategy against (e.g. 1 or 5 min) it is actually pulling the daily data from the connected data provider?

                  Thanks and regards,

                  Dan

                  Comment


                    #10
                    Dan, correct for manually imported data you would need to import your 1 min intraday data and your daily historical data.

                    For the historical data provided by the data connections it depends on the connection option you use - http://www.ninjatrader-support.com/H...ricalData.html

                    Workaround for the manually imported data would be to use 1440 min to simulate the daily frame...or import historical daily data for the symbols.
                    BertrandNinjaTrader Customer Service

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by frankthearm, Today, 09:08 AM
                    5 responses
                    14 views
                    0 likes
                    Last Post NinjaTrader_Clayton  
                    Started by jeronymite, 04-12-2024, 04:26 PM
                    3 responses
                    43 views
                    0 likes
                    Last Post jeronymite  
                    Started by yertle, Today, 08:38 AM
                    5 responses
                    15 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Started by adeelshahzad, Today, 03:54 AM
                    3 responses
                    19 views
                    0 likes
                    Last Post NinjaTrader_BrandonH  
                    Started by bill2023, Yesterday, 08:51 AM
                    6 responses
                    27 views
                    0 likes
                    Last Post NinjaTrader_Erick  
                    Working...
                    X