> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.ninjatrader.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.ninjatrader.com/_mcp/server.

# Performance Metrics

Custom Performance Metrics can be used when generating Trade Performance statistics.

Once custom performance metrics are created be sure to enable their usage in [Tools > Options > General](https://ninjatrader.com/support/helpGuides/nt8/NT%20HelpGuide%20English.html?general_section.htm) or else they will not be available in the [Strategy Analyzer](https://ninjatrader.com/support/helpGuides/nt8/?strategy_analyzer.htm) or [Trade Performance](https://ninjatrader.com/support/helpguides/nt8/?trade_performance.htm) windows.

## In this section

| Method                                                                                                       | Description                                                                                                                                         |
| ------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Format()](/developer/desktop-sdk/references/performance-metrics/format)                                     | This method allows you to customize the rendering of the performance value on the Summary grid.                                                     |
| [OnAddTrade()](/developer/desktop-sdk/references/performance-metrics/onaddtrade)                             | This method is called as each trade is added.                                                                                                       |
| [OnCopyTo()](/developer/desktop-sdk/references/performance-metrics/oncopyto)                                 | Called as the values of a trade metric are saved.                                                                                                   |
| [OnMergePerformanceMetric()](/developer/desktop-sdk/references/performance-metrics/onmergeperformancemetric) | This method is called when the Performance Metric would be aggregated and merged together.                                                          |
| [PerformanceUnit](/developer/desktop-sdk/references/performance-metrics/performanceunit)                     | Enumeration defining each type of PerformanceUnit calculated by NinjaTrader. Used to store a value for this performance type in PerformanceMetrics. |
| [Values](/developer/desktop-sdk/references/performance-metrics/values)                                       | The Values array holds an 5 values corresponding to each Cbi.PerformanceUnit.                                                                       |