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 lightsun47, Today, 03:51 PM
        0 responses
        5 views
        0 likes
        Last Post lightsun47  
        Started by 00nevest, Today, 02:27 PM
        1 response
        9 views
        0 likes
        Last Post 00nevest  
        Started by futtrader, 04-21-2024, 01:50 AM
        4 responses
        45 views
        0 likes
        Last Post futtrader  
        Started by Option Whisperer, Today, 09:55 AM
        1 response
        14 views
        0 likes
        Last Post bltdavid  
        Started by port119, Today, 02:43 PM
        0 responses
        9 views
        0 likes
        Last Post port119
        by port119
         
        Working...
        X