Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Trade Performance Values Bug?

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

    Trade Performance Values Bug?

    Hello there is an example in NT8 Documentation within this path:


    Navigation: NinjaScript > Language Reference > Strategy >

    protected override void OnBarUpdate()
    {
    // If the profit on real-time trades is > $1000 stop trading
    if (SystemPerformance.RealtimeTrades.TradesPerformance.Currency.CumProfit > 1000)
    return;
    }

    I use that example in coding but get an error.

    However, if I replace RealtimeTrades with AllTrades... everything is OK.
    SystemPerformance.AllTrades.TradesPerformance.Currency.CumProfit

    So is the documentation wrong or the compiler?

    And if I use the SystemPerformance.AllTrades.TradesPerformance.Currency.CumProfit

    will this tally the total in the local strategy or across all my strategies?

    Thank you
    Last edited by geekodude; 02-26-2016, 03:49 PM.

    #2
    Hello,

    Thank you for the question.

    Was the full path to this page: NinjaScript > Language Reference > Strategy > TradesPerformanceValues?

    If not could you right click the section you had found this sample in and copy its URL and provide a link to that page?

    I found this sample: http://ninjatrader.com/support/helpG...ancevalues.htm

    If this is the one you had used, I see that what is provided in the help guide is not capitalized correctly like the sample:

    Help guide has:
    RealtimeTrades
    but is instead
    RealTimeTrades
    If you capitalize Time in RealTime the example you had provided should work as intended.

    I will submit this, in the case you located a different sample I would like to update them all.

    I look forward to being of further assistance .

    Comment


      #3
      yes, you have the correct path.

      I've inserted "RealTimeTrades" in place of "AllTrades" and my code compiles.

      Thank you

      Comment


        #4
        I've just fixed this everywhere that it is listed in the help guide, so it should be reflected properly throughout the guide after the next time we publish an update.
        Dave I.NinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        660 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        375 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        110 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        574 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        579 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X