Data Analytics Overview:
Data Analytics, often abbreviated to DA in this documentation. This feature allows you to analyse the performance of different trading signals within NinjaTrader. It’s designed to help you understand which signals are most reliable and profitable based on historical bar data. The system automatically calculates key performance indicators like profit factor, hit rate, and total trades, providing a clear picture of each signal’s effectiveness. It’s particularly useful for backtesting and refining your trading strategies.
Internally, this is done on a tick by tick series – It is internal code and does not use the Ninjatrader backtesting framework. It provides for basic fill simulation, including accounting for volume and latency to ensure more realistic reporting. As such, it is possible for report output to vary slightly from run to run (small random latencies are part of the fill algorithms and can affect fills).
Various signals and combinations of signals can be detected. To produce a report, you should follow the following steps
- Go to the data series chart icon, and set the chart period to a relevant period of days. 30 days would be a reasonable sample period. OK to accept.
- Go to the pjsprofilebars settings and in the Data Analytics group, check the ‘Signals Performance Report’ option. OK to accept.
- As your chart refreshes, it will build the report, which will be saved in a CSV file in your \Documents\NinjaTrader 8 folder. Please look for the ‘pjs’ folder, then pjsProfileBars. Inside that folder you will find a CSV text file, ‘Signal Performance Report.csv’. We recommend using a third party tool such as Google Sheets to analyze this. You can simply cut and paste the text into a blank sheet, click the option to ‘split text to columns’, and you should get a nicely formatted sheet with all the data and powerful analysis available at your fingertips!
Quality threshold (option)
For 70%, use 0.70. This is a quality filter to ensure only higher-quality data passes through to charts.
Data Sampling Rate
You can filter how much data from your bars to send. 1 = Everything, every single bar. 0.8 would be 80%. Using less than 100% can speed up analysis, without significantly harming results.
Force rebuild
This forces a re-analysis of the data. To rebuild all databases and logic. This may be required after indicator upgrades due to changes in how data is processed, or from time to time as you ensure the results are derived from recent data.
File name
Use a normal 8.1 filename that is unique for this chart setup.
Show BIAS scores
Shows some bias data on the chart from current data analysis.
Backfill bars on restart
This runs DA on the X historical bars once the chart has loaded.
Signals performance report
Analyse all chart data on chart load for signals and export that data along with trade statistics as a CSV that can be analysed in a spreadsheet for edges. The intent of this option is to provide details of the edge of any of the signals, or your own algobars criteria, that have been detected in this data set. It will also test combinations of signals. Only the top signals are stored.
BIAS mode
pjsProfileBars changes internals slightly depending on if you are looking for scalp or trend trades.
Min price change
This is the value, in points, to determine if a bar closed up or down. For example, setting a value of 4 here will only consider the bar an upclose or downclose if it closed 4 points from it’s open. This is to enhance the dataset, so the up and down bars categories exclude bars with minimal moves.
Price target
The price move in points you are looking for to consider the trade a win
Stop loss
The stop loss to use in points to consider the trade a loss