var sv = new ContinuousSecurity { Id = "SV", Code = "SV", MinStepSize = 0.01M, Exchange = Exchange.Rts, };
sv.ExpirationJumps.Add(new Security { Id = "SVH2@RTS", MinStepSize = 0.01M, Exchange = Exchange.Rts, }, new DateTime(2012, 3, 15, 18, 45, 00));
sv.ExpirationJumps.Add(new Security { Id = "SVM2@RTS", MinStepSize = 0.01M, Exchange = Exchange.Rts, }, new DateTime(2012, 6, 15, 18, 45, 00));
sv.ExpirationJumps.Add(new Security { Id = "SVU2@RTS", MinStepSize = 0.01M, Exchange = Exchange.Rts, }, new DateTime(2012, 9, 15, 18, 45, 00));
sv.ExpirationJumps.Add(new Security { Id = "SVZ2@RTS", MinStepSize = 0.01M, Exchange = Exchange.Rts, }, new DateTime(2012, 12, 15, 18, 45, 00));
var portfolio = new Portfolio { Name = "test account", BeginValue = 1000000m };
var storageRegistry = new StorageRegistry();
((LocalMarketDataDrive) storageRegistry.DefaultDrive).Path = @"C:\Worke\MDD";
_emulationTrader = new EmulationTrader(
new[] { sv },
new[] { portfolio })
{
StorageRegistry = storageRegistry,
UseMarketDepth = false,
TradesKeepTime = new TimeSpan(4),
};
var strategy = new VoprosStrategy(_emulationTrader, sv, portfolio);
_emulationTrader.Connect();
_emulationTrader.StartExport();
_emulationTrader.Start(new DateTime(2012, 01, 01), new DateTime(2012, 12, 31));
strategy.Start();