Hi. Having a problem with DataSimulator.Subscribe. What I need is historical exchange rates to use in my strategy. So I don't wish to trade these instruments but rather be using them for calculations in my backtest. When i use DataSimulator.Subscribe more than once I get the error:
DataSeriesObject synch error. skipping. Here is an example code which leads to my error:
Code:
using System;
using SmartQuant;
namespace OpenQuant
{
public partial class MyScenario : Scenario
{
public MyScenario(Framework framework)
: base(framework)
{
}
public override void Run()
{
DataSimulator.SubscribeBar = false;
strategy = new MyStrategy(framework, "Backtest");
strategy.AddInstrument("CME_ES1");
DataSimulator.Subscribe(InstrumentManager.Instruments["EUR"]);
DataSimulator.Subscribe(InstrumentManager.Instruments["CAD"]);
StartStrategy();
}
}
}
In the above CME_ES1 is the instrument i wish to trade,daily bars (OHLC), whilst my currency data is daily trades. For each new usage of DataSimulator.Subscribe i get the another synch error.
Am I going about this the correct way?
Cheers