NC Delta Pairs Description
NC Delta Pairs is a delta pairs indicator for NinjaTrader 8, and it comes with the full C# source code. Synthetic delta trading is definitely something to look into: instead of watching two related instruments on their own, you watch the difference between them. The number of combinations you can try is impressive, so I wanted a quick way to put any pair on a chart. Keep in mind it's a plain price difference with no ratio or multiplier, so it reads best when both instruments trade at similar prices, or when the raw spread is what you care about.
How it works. On every bar the indicator takes the close of your chart's instrument and subtracts the close of the instrument you pick in Select Instrument at the same time, or the last bar before it if the second instrument has no bar at that moment. That difference is the delta. An average of the delta is built with your MA Type, one of seven: EMA (the default), SMA, HMA, TMA, TEMA, VWMA or WMA, over MA Period bars (50 by default). The upper and lower bands sit StDev standard deviations (1 by default) above and below the average, with the standard deviation of the delta measured over the same period. If no instrument is selected, it writes an error to the log and draws nothing.
What you see. A separate panel with the delta as a blue line, the average as an orange-red line, and the two bands as dashed orange-red lines. The price marker uses the finer tick size of the two instruments, so small differences show with enough decimals. It calculates on bar close. Delta, Average, Upper and Lower are public values, so a strategy can read them.
How to use it. Watch for the delta stretching outside the bands: the two instruments are further apart than usual, and the question is whether they come back together. Raise StDev to see only the bigger stretches, and shorten MA Period to follow faster changes. Both instruments should have data for the same days and similar sessions, otherwise the delta compares bars from different moments. Test a pair well before you trade it.
Make it yours. Use it as is, learn from the code, or change it yourself or with AI like Claude. You could add a ratio or hedge multiplier so instruments at different prices compare fairly, an alert when the delta leaves the bands, or band crossings as signals for a strategy. It's one short file with the second instrument, the average and the bands in clear separate steps, so it's an easy base to build on. Have some good trades!