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 ;
    http://ninjatrader.com/support/helpG...collection.htm
    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 :
      https://www.screencast.com/t/fkzTL6Ib3UT
      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 Rosario, Today, 12:50 AM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by Ithinkimlost, Yesterday, 08:50 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by Stanfillirenfro, Today, 05:31 AM
        0 responses
        25 views
        0 likes
        Last Post Stanfillirenfro  
        Started by sidlercom80, Today, 04:45 AM
        0 responses
        3 views
        0 likes
        Last Post sidlercom80  
        Started by NT-Roland, Today, 04:44 AM
        0 responses
        4 views
        0 likes
        Last Post NT-Roland  
        Working...
        X