Hello all,
Iam having trouble getting my futures algo to work. I get an error with my add data line and cant figure out how to resolve it. I've removed everything not pertinent, however I believe the problem is within these lines. Iam still rather new to coding and QC. Any help or suggestions would be greatly appreciated!!
using System;
using System.Linq;
using QuantConnect.Indicators;
using QuantConnect.Models;
namespace QuantConnect.Algorithm.Examples
{
public class EMACross : QCAlgorithm
{
private string symbol2 = "CHRIS/CME_CL1";
private string symbol = "SCF/CME_CL1_ON";
string _crude = "SCF/CME_CL1_ON";
private ExponentialMovingAverage fast;
private ExponentialMovingAverage slow;
public override void Initialize()
{
// backtest span
SetStartDate(2014,07,01);
SetEndDate(2016,01,13);
// starting cashish
SetCash(20000);
// add Symbol data
AddData
AccountValue=Portfolio.TotalPortfolioValue;
Log("Starting Account Value: " + AccountValue);
// EMA Settings
emaFast = x;
emaSlow = x;
// EMAS
fast = EMA(symbol, emaFast, Resolution.Daily);
slow = EMA(symbol, emaSlow, Resolution.Daily);
// tolerances
tolerance = 0.00024m;
// Set Warmup
int warmupPeriod = emaSlow;
var history = History("symbol2", warmupPeriod);
foreach (var tradeBar in history)
{
fast.Update(tradeBar.EndTime, tradeBar.Close);
slow.Update(tradeBar.EndTime, tradeBar.Close);
}
}
public void OnData(Quandl data)
{