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 Mizzouman1, Today, 07:35 AM
        4 responses
        18 views
        0 likes
        Last Post Mizzouman1  
        Started by philmg, Today, 01:17 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by cre8able, Today, 01:01 PM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by manitshah915, Today, 12:59 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_Erick  
        Started by ursavent, Today, 12:54 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Working...
        X