Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Count not working NT8

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

    Trade Count not working NT8

    Support,

    I am working on a strategy which uses Trade count NT 8 64 bit. I am testing this in PlayBack. It was working for about 2 weeks then it just stopped working. When it first happened, I reset my database and it started working. Now it has stopped again. Resetting the database did not fix it.

    First off, I want to verify my code and make sure it is not user error.

    Code:
    Print("Trade Count Onbarupdate: " + SystemPerformance.AllTrades.Count.ToString());
    
    if (SystemPerformance.AllTrades.Count > 0)
    {
    //Do Something
    }
    Results from Print statement:
    ...
    Trade Count Onbarupdate: 0
    Trade Count Onbarupdate: 0
    Trade Count Onbarupdate: 0
    Trade Count Onbarupdate: 0
    Trade Count Onbarupdate: 0

    If I run a strategy performance report the trades and counts are there.

    Checked the log and there are no errors.

    What am I missing?

    Robert

    #2
    Adding screenshot

    Adding screenshot..
    Attached Files

    Comment


      #3
      Ok, after playing around with it realized that I added the strategy on the Strategy tab instead of adding it on the chart. When I added the strategy to the chart the trade count worked.

      Is this expected behavior that trade counts only work when a strategy is added to a chart?

      Robert

      Comment


        #4
        Hello SilverDragon,

        You need to use IncludeTradeHistoryInBacktest when applying to the Strategies tab: http://ninjatrader.com/support/helpG...inbacktest.htm

        This is necessary for saving the orders, trades, and executions history. Without the chart this is omitted to save resources.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by argusthome, 03-08-2026, 10:06 AM
        0 responses
        83 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        47 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        29 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        32 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        66 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X