• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Some NASDAQ stocks produce no backtest results

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

    Some NASDAQ stocks produce no backtest results

    Hi all, I am backtesting a strategy which pulls in data and produces good results for most NASDAQ stocks, but a few, including AAPL and ALXN produce zeros. The charts have enough bars and there should be trades showing, but there aren't. The data feed is from Kinetick and is the 100 stocks kind of feed. I'm running the backtest strategy against one stock at a time. All ideas are appreciated!

    #2
    Hello HelenL,

    First thing to check is the charts tab after running the backtest, which can be helpful for visualizing the data you have, and any indicators you have added to your strategy. If you're not able to make progress there, next step is debugging. To debug you can Print() the values used in your entry conditions, and check that they're what you expect using the Tools menu > Output Window. You can check for messages related to strategy order submission by enabling TraceOrders = true; in your strategies Initialize() method. Help for using these debugging tools is available here.

    http://www.ninjatrader.com/support/f...ead.php?t=3418
    Ryan MNinjaTrader Customer Service

    Comment


      #3
      Thanks Ryan, I worked out that AAPL was not backtesting due to having a large ATR that prevented the position sizing algorithm from buying any stocks at all! This was easily fixed by changing the configuration input parameters.

      I now have moved on and found other stocks which do not execute backtest trades and these give the following error in the log: "Error on calling 'OnBarUpdate' method for strategy '.....': Object reference not set to an instance of an object." Using the same strategy and same configuration, some stocks backtest with good results and some produce this error with no results. Any ideas on this one? I'm using Kinetic realtime data feed. Thanks :-) Helen

      Comment


        #4
        That is a common coding error, that your strategy accesses objects that don't exist. When it happens in a strategy, it's commonly order objects. To identify specifically what it is, best is to simplify and isolate small sections of code. You can also use try catch blocks to provide you more information on the error. Help for using try catch blocks is available here:
        http://www.ninjatrader.com/support/f...ead.php?t=9825
        Ryan MNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by rudccv, Today, 08:42 PM
        0 responses
        3 views
        0 likes
        Last Post rudccv
        by rudccv
         
        Started by Newtrader101, Today, 03:54 PM
        1 response
        17 views
        0 likes
        Last Post NinjaTrader_ShawnB  
        Started by williamzz, Today, 03:28 PM
        0 responses
        7 views
        0 likes
        Last Post williamzz  
        Started by Robert87, Today, 11:07 AM
        0 responses
        15 views
        0 likes
        Last Post Robert87  
        Started by phta123, Today, 10:24 AM
        0 responses
        17 views
        0 likes
        Last Post phta123
        by phta123
         
        Working...
        X