• 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

PerformanceMetrics value access in strategy

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

    PerformanceMetrics value access in strategy

    Hi, I've looked at the documentation and example given: https://ninjatrader.com/support/help...erformance.htm

    But I don't seem to understand how to access the Values out of the SampleCumProfit PerformanceMetrics object. Could someone show an example where I can pull the Values[0] (currency value) into a double variable on a bar update?

    Thanks.

    #2
    Hello mohawkTrader,

    I am unaware of a specific example of locating a custom performance metric value. The following seems to be doing that, Have you tried the following to check if it is listed?

    https://ninjatrader.com/support/help...ormanceMetrics


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks Jesse,

      The syntax is a bit confusing, but I do have it working now. I was going back and forth with all kinds of attempts, but I think the main issue may have been not having the Custom Performance Metric enabled through the Control Panel - therefore it was not accessible in the strategy analyzer. This is in the documentation, I just missed it. (see below)


      From: https://ninjatrader.com/support/help...ncemetrics.htm
      "Once custom performance metrics are created be sure to enable their usage in Tools > Options > General or else they will not be available in the Strategy Analyzer or Trade Performance windows."

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Grantx, Today, 08:22 AM
      0 responses
      5 views
      0 likes
      Last Post Grantx
      by Grantx
       
      Started by Swing123, Today, 08:21 AM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_BrandonH  
      Started by lunardiplomacy, Today, 07:57 AM
      0 responses
      3 views
      0 likes
      Last Post lunardiplomacy  
      Started by Tagliareni, Yesterday, 08:10 PM
      1 response
      11 views
      0 likes
      Last Post NinjaTrader_PaulH  
      Started by SDaCosta30, Today, 04:19 AM
      2 responses
      14 views
      0 likes
      Last Post SDaCosta30  
      Working...
      X