• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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 Branpo, Today, 01:25 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by aslane, Today, 12:47 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by HavasuTrader, Today, 12:30 PM
        1 response
        10 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Started by Boonfly8, Today, 12:20 PM
        1 response
        3 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by RedDuke, Today, 11:40 AM
        1 response
        6 views
        0 likes
        Last Post NinjaTrader_PatrickG  
        Working...
        X