/// <summary> /// Initialize the data and resolution you require for your strategy /// </summary> public override void Initialize() { SetStartDate(2014, 1, 1); SetEndDate(2018, 1, 1); SetCash(25000); // Define the symbol and "type" of our generic data AddData <CustomData>(_ibm, Resolution.Daily); AddData <CustomData>(_spy, Resolution.Daily); // Set up default Indicators, these are just 'identities' of the closing price _smaIBM = SMA(_ibm, 1); _smaSPY = SMA(_spy, 1); // This will create a new indicator whose value is smaSPY / smaIBM _ratio = _smaSPY.Over(_smaIBM); }
/// <summary> /// Initialize the data and resolution you require for your strategy /// </summary> public override void Initialize() { SetStartDate(2014, 1, 1); SetEndDate(2018, 1, 1); SetCash(25000); // Define the symbol and "type" of our generic data AddData <QuandlVix>(_vix, Resolution.Daily); AddData <Quandl>(_vxv, Resolution.Daily); // Set up default Indicators, these are just 'identities' of the closing price _smaVIX = SMA(_vix, 1); _smaVXV = SMA(_vxv, 1); // This will create a new indicator whose value is smaVXV / smaVIX _ratio = _smaVXV.Over(_smaVIX); }