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 PaulMohn, Today, 12:36 PM
        0 responses
        2 views
        0 likes
        Last Post PaulMohn  
        Started by love2code2trade, 04-17-2024, 01:45 PM
        4 responses
        38 views
        0 likes
        Last Post love2code2trade  
        Started by alifarahani, Today, 09:40 AM
        2 responses
        14 views
        0 likes
        Last Post alifarahani  
        Started by junkone, Today, 11:37 AM
        3 responses
        20 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by frankthearm, Yesterday, 09:08 AM
        12 responses
        44 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Working...
        X