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 chbruno, Today, 04:10 PM
        0 responses
        1 view
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        436 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        6 views
        0 likes
        Last Post FAQtrader  
        Started by rocketman7, Today, 09:41 AM
        5 responses
        19 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by frslvr, 04-11-2024, 07:26 AM
        9 responses
        127 views
        1 like
        Last Post caryc123  
        Working...
        X