Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

SystemPerformance when Strategy not attached to a Chart

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

    SystemPerformance when Strategy not attached to a Chart

    Hi,

    Following a customer issue I noticed that SystemPerformance is always empty if the Strategy is attached to Control Center instead of a Chart.

    Using the example #1 from the help ;

    and adding a line to Enter Long on each up bar ( see example attached )

    If the Strategy is Enabled on a Chart it prints correctly the results of each trade.
    If it is attached on Control Center without using a Chart, then there are no results

    If there is another way to calculate the trade results, just let me know

    Thanks
    Pablo
    Attached Files
    pmaglio
    NinjaTrader Ecosystem Vendor - The Indicator Store

    #2
    Hello pmaglio,

    Thank you for your post.

    Please use SystemPerformance.AllTrades.TradesCount and advise if the TradesCount is 0 as well.

    You can find information on TradesCount at the following link: http://ninjatrader.com/support/helpG...radescount.htm

    Please let me know if you have any questions.

    Comment


      #3
      Thanks for your help,
      I see that SystemPerformance.AllTrades.TradesCount has the correct number of trades
      while SystemPerformance.AllTrades.Count is zero ( only when not attached to a chart )

      The problem now is that
      Trade lastTrade = SystemPerformance.AllTrades[SystemPerformance.AllTrades.TradesCount - 1]; tries to access a null array

      May be Im doing something wrong ?
      Im stuck here :
      World's leading screen capture + recorder from Snagit + Screencast by Techsmith. Capture, edit and share professional-quality content seamlessly.
      pmaglio
      NinjaTrader Ecosystem Vendor - The Indicator Store

      Comment


        #4
        Hello pmaglio,

        Thank you for your patience.

        I was incorrect, you do not replace Count with TradesCount. You would still use Count but would include the following in the Configure State of your strategy:
        Code:
        IncludeTradeHistoryInBacktest = true;
        For information on IncludeTradeHistoryInBacktest please visit the following link: http://ninjatrader.com/support/helpG...inbacktest.htm

        Please let me know if you have any questions.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        41 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        28 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        45 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        37 views
        0 likes
        Last Post CarlTrading  
        Working...
        X