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.

    Ryan M.NinjaTrader 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:
        Ryan M.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by gentlebenthebear, Today, 01:30 AM
        0 responses
        2 views
        0 likes
        Last Post gentlebenthebear  
        Started by samish18, Yesterday, 08:31 AM
        2 responses
        9 views
        0 likes
        Last Post elirion
        by elirion
         
        Started by Mestor, 03-10-2023, 01:50 AM
        16 responses
        389 views
        0 likes
        Last Post z.franck  
        Started by rtwave, 04-12-2024, 09:30 AM
        4 responses
        31 views
        0 likes
        Last Post rtwave
        by rtwave
         
        Started by yertle, Yesterday, 08:38 AM
        7 responses
        30 views
        0 likes
        Last Post yertle
        by yertle
         
        Working...
        X