Correlation
Description
The correlation indicator will plot the correlation of the data series to a desired instrument. Values close to 1 indicate movement in the same direction. Values close to -1 indicate movement in opposite directions. Values near 0 indicate no correlation.
Syntax
Correlation(int period, string correlationSeries)
Correlation(ISeries\<double\> input, int period, string correlationSeries)
Return Value
double; Accessing this method via an index value int barsAgo returns the indicator value of the referenced bar.
Parameters
Examples
If the correlation series does not plot during a time the input series plots, a value of zero would plot in the above example. You may consider ignoring zero values.
Source Code
You can view this indicator method source code by selecting the menu New > NinjaScript Editor > Indicators within the NinjaTrader Control Center window.

