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

Strategy Performance Summary showing phantom short trades on a Long-only strategy

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

    Strategy Performance Summary showing phantom short trades on a Long-only strategy

    I have a "long only" NinjaScript strategy (i.e. No 'short entry' logic exists) -- when I evaluate the performance by right-clicking the chart and selecting the strategy performance, the summary shows short trades even though there are no short trades in the logic or in the executions section.

    I only have one strategy loaded on the chart. I made sure the db was not corrupt. Not sure where these phantom trades are coming from... are there any known bugs with the backtest strategy performance summaries?

    #2
    For extra context, my chart with the strategy is a 2 min chart, and the script calculates 'on each tick' -- I have logic that evaluates the number of seconds that have passed in the current bar... this does not affect the backtest logic as the backtest will only evaluate the entry logic on previous bar close -- Using 'standard' fill resolution of course. I have an added data series of 1 tick for the indicators that require 'per tick' calculation. All this aside, I found that if I add the bar series for the tick data series to the entry function --> EnterLong(1, size, "long") vs EnterLong(size, "long") -- the short trades no longer show and the logic performs as intended...

    So, I believe there may be a bug in the backtest functionality since no short trade logic even exists... applying the '1 tick' bar series for 'EnterLong' function should not disrupt the underlying trade direction. It's very strange that it behaves as though short trades are being introduced when 'EnterLong' doesn't have the bar series added to it. Any additional insight will be greatly appreciated.

    Comment


      #3
      Hello afcmaff,

      Thank you for your posts.

      Would you be able to provide a reduced version of the strategy that displays this behavior? Any code not necessary to reproduce should be removed. Please export the reduced strategy from Tools > Export > NinjaScript Add-on and do not click the box to export as a compiled assembly or we will not be able to review your code. Please attach the resulting .Zip file to your reply.

      Thanks in advance; I look forward to assisting you further.
      Kate W.NinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by aa731, Today, 02:54 AM
      0 responses
      4 views
      0 likes
      Last Post aa731
      by aa731
       
      Started by thanajo, 05-04-2021, 02:11 AM
      3 responses
      470 views
      0 likes
      Last Post tradingnasdaqprueba  
      Started by Christopher_R, Today, 12:29 AM
      0 responses
      10 views
      0 likes
      Last Post Christopher_R  
      Started by sidlercom80, 10-28-2023, 08:49 AM
      166 responses
      2,237 views
      0 likes
      Last Post sidlercom80  
      Started by thread, Yesterday, 11:58 PM
      0 responses
      4 views
      0 likes
      Last Post thread
      by thread
       
      Working...
      X