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 nandhumca, Today, 03:41 PM
        0 responses
        4 views
        0 likes
        Last Post nandhumca  
        Started by The_Sec, Today, 03:37 PM
        0 responses
        3 views
        0 likes
        Last Post The_Sec
        by The_Sec
         
        Started by GwFutures1988, Today, 02:48 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        6 responses
        33 views
        0 likes
        Last Post ScottWalsh  
        Started by frankthearm, Today, 09:08 AM
        10 responses
        36 views
        0 likes
        Last Post frankthearm  
        Working...
        X