Spread3 Price of 3 Instruments - For NinjaTrader 7 & higher
[Spread3] Calculates price of synthetic combination of 3 instruments Parameters are symbol of second & third instruments, and quantities of all instruments (positive for long, negative for short). PointValues from the instrument manager are optionally used as multipliers.
The primary chart instrument (BarsInProgress == 0) is the "clock" to which the other instruments are synchronized. You should make sure the most active instrument is the one selected as the primary instrument. The output of this indicator changes only when the OnBarUpdate is called for the primary instrument.
This indicator can be extended to 4 or more instruments. See my "Correlation" indicator for examples of how to do synchronized calculations with lookbacks
Kevin Doren 9/26/2010
2010.09.23 Spread6 Trader.Jon added support for N4 =4 decimal places && add to a total 6 supported symbols && reformated properties structures for readability
2010.09.27 updated to include changes from the new release of Spread3 .. exported as Spread6 from NT7b20
Category NinjaTrader 7 Indicators
|
|
|