NexusFi: Find Your Edge


Home Menu

 



Categories Help    






 
Index 5 *
"Index" is a multi-purpose multi-instrument indicator. It can be use to plot a 2 (or more) instrument spread, a total portfolio value, a 2 (or more) instrument pair or basket trade price, a multi-instrument index of your own creation, or even to calculate a major index (mainly useful for demonstration purposes). It works with "CalculateOnBarClose" set to either false (real-time) or true (for lower CPU overhead).

Parameters are:
1) SymbolList: a comma-delimited list of symbols
2) WeightList: a comma-delimited list of weights (1 per symbol; or a single weight (default: 1) for all symbols)
3) Divisor: A number (default: 1) divided into the sum of (symbols x weights)
4) NoOutputWhenMissingInput: (default: false) if true, plot will be blank for any bars which have a missing input; if false, the last known good output will be repeated.
5) OldestDataMinutes: Input is considered missing if older than this many minutes. If set to 0 (default) Input is considered missing if older than 1 bar. In no event will it use data from a prior day (if the symbol hasn't opened yet today, it is considered missing).

The ""Input Series" for the indicator is NOT used in the calculation; it is the "clock" that drives the output, and must be time-based (i.e. minute, day, etc. bars). The Input Series should be an active instrument (no missing bars). If you want to plot this indicator on a non-time-based chart (i.e. volume bars), you need to add a time-based data series to the chart, and select that as the "Input Series" to the indicator. This indicator may be used as input to another indicator, but if so you must press "F5" after adding it to the chart due to NT7 issues. Exported using NT version 7.0.1000.3

Usage Examples:

(1) Plot a pair trade spread: Long 3 INTC, Short 7 AMD
SymbolList: INTC,AMD
WeightList: 3,-7
Divisor: 1

(2) Plot the spread between two futures months:
SymbolList: ES 06-11,ES 09-11
WeightList: 1,-1
Divisor: 1

(3) Plot the value of a portfolio: 100 SBUX, 300 ACN, 100 AAPL, 200 CAT, 400 T, 100 GLD
SymbolList: SBUX,ACN,AAPL,CAT,T,GLD
WeightList: 100,300,100,200,400,100
Divisor: 1

Reproducing a major index is not especially useful because index quotes and history are easily available from data providers.
The following examples show how they are created, so you can create your own index that has meaning to you.

(4) Plot the Dow Jones Industrial Average (a price-weighted index)
SymbolList: MMM,AA,AXP,T,BAC,BA,CAT,CVX,CSCO,KO,DD,XOM,GE,HPQ,HD,INTC,IBM,JNJ,JPM,KFT,MCD,MRK,MSFT,PFE,PG,TRV,UTX,VZ,WMT,DIS
WeightList: 1 (DJIA is price weighted, all components have equal weight)
Divisor: 0.132129493 (the Dow Divisor as of 7/2/10, see https://www.cmegroup.com/trading/equity-index/files/djia-history-divisor.pdf)

(5) Plot SOX (a market-cap weighted index, weights are shares outstanding on 2/20/11, shares and divisor are from from https://indexes.nasdaqomx.com/MonthEndFiles.aspx)
SymbolList: ALTR,AMAT,AMD,ATHR,AVGO,BRCM,CREE, CRUS,HITT,INTC,KLAC,LLTC,LRCX, MKSI,MRVL,MU,NETL,NSM,NVDA, NVLS,POWI,RBCN,SNDK,STM,TER, TSM,TXN,VECO,WFR,XLNX
WeightList: 364951315,2060521585,1396802719,146660859,490415275, 575686296,196473483,141628229, 63130703,1212702808,342283544, 392826431,251960161,103124900,
1105594919,1763931357,130849166, 490825711,941628062,184777433, 57263098,46993684,287133221, 153857427,371654361,1191268991, 805417714,81755766,465958033, 472202863
Divisor: 822180367


Category NinjaTrader 7 Indicators 
 
Suggest other entries I might like
Details: Index
Category: NinjaTrader 7 Indicators 


April 12th, 2011
Size: 10.93 KB
Downloaded: 664 times
Comments/ratings
5 * maumau May 29th, 2011 04:46 PM
No Comment
5 * raffu June 28th, 2011 04:28 AM
Thanks, great for looking spreads!
5 * Sim22 August 4th, 2011 04:51 AM
Thank you could be useful
5 * MWinfrey October 5th, 2011 01:12 PM
Cool indicator...now I don't have to write one myself.
5 * dilbert618 December 4th, 2012 03:53 PM
Great idea, Thank you
5 * jmont1 June 19th, 2017 03:54 PM
Great indi !!! Any chance U R doing an NT8 ? I have tried converting it without success.
4 * BKOp September 14th, 2018 09:29 PM
One more request for an NT8 version. I haven't found another indicator that can handle the oil crack spread 3 instruments with multiplication, and have moved from NT7 to NT8.

 
Sort by

 




© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top