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 :
      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 ghoul, Today, 06:02 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by jeronymite, 04-12-2024, 04:26 PM
        3 responses
        44 views
        0 likes
        Last Post jeronymite  
        Started by Barry Milan, Yesterday, 10:35 PM
        7 responses
        20 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by AttiM, 02-14-2024, 05:20 PM
        10 responses
        180 views
        0 likes
        Last Post jeronymite  
        Started by DanielSanMartin, Yesterday, 02:37 PM
        2 responses
        13 views
        0 likes
        Last Post DanielSanMartin  
        Working...
        X