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 .
    JesseNinjaTrader Customer Service

    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 Rapine Heihei, Today, 08:19 PM
        0 responses
        1 view
        0 likes
        Last Post Rapine Heihei  
        Started by f.saeidi, Today, 08:01 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by Rapine Heihei, Today, 07:51 PM
        0 responses
        4 views
        0 likes
        Last Post Rapine Heihei  
        Started by frslvr, 04-11-2024, 07:26 AM
        5 responses
        96 views
        1 like
        Last Post caryc123  
        Started by algospoke, 04-17-2024, 06:40 PM
        6 responses
        49 views
        0 likes
        Last Post algospoke  
        Working...
        X