private void TimrStartup_Tick(object sender, EventArgs e) { if (ORBlotter.Count != 0 && OSBlotter == null) { List <string> LSProducts = ORBlotter.GetProducts; OSBlotter = new OpenSettingsBlotter(TOKEN, USERID); OSBlotter.Load(LSProducts); ARCHIVE = new Archive(TOKEN, USERID, LSProducts); ANALYSIS = new Analysis(ref ARCHIVE, ref ACCOUNT); AUTOTREADER = new AutoTreader(ref ARCHIVE, ref ORBlotter, ref ODBlotter, ref OSBlotter, ref ACCOUNT); SIMULATION = new AsmodatForexEngineAPI.Simulation(ref ORBlotter, ref OSBlotter, ref ARCHIVE, ref ACCOUNT, ref DATABASE); SIMULATION1 = new AsmodatForexEngineAPI.Simulation(ref ORBlotter, ref OSBlotter, ref ARCHIVE, ref ACCOUNT, ref DATABASE); SIMULATION2 = new AsmodatForexEngineAPI.Simulation(ref ORBlotter, ref OSBlotter, ref ARCHIVE, ref ACCOUNT, ref DATABASE); /* SIMULATION4 = new AsmodatForexEngineAPI.Simulation(ref ORBlotter, ref OSBlotter, ref ARCHIVE, ref ACCOUNT, ref DATABASE); * SIMULATION5 = new AsmodatForexEngineAPI.Simulation(ref ORBlotter, ref OSBlotter, ref ARCHIVE, ref ACCOUNT, ref DATABASE); * SIMULATION6 = new AsmodatForexEngineAPI.Simulation(ref ORBlotter, ref OSBlotter, ref ARCHIVE, ref ACCOUNT, ref DATABASE);*/ } else if (OSBlotter != null && OSBlotter.IsLoaded) { TimrArchive.Interval = 1; TimrArchive.Enabled = true; TimrControls.Enabled = true; //TimrSimulation.Enabled = true; //TimrSimulationTest.Enabled = true;//TODO: DISABLE TimrStartup.Enabled = false; TsslInfo2.Text = "Thank you, for your patience."; } }
public Simulation(ref OpenRatesBlotter ORBlotter, ref OpenSettingsBlotter OSBlotter, ref Archive ARCHIVE, ref Account ACCOUNT, ref DataBase DATABASE) { ANALYSIS = new Analysis(ref ARCHIVE, ref ACCOUNT); this.ARCHIVE = ARCHIVE; this.OSBlotter = OSBlotter; this.ORBlotter = ORBlotter; this.ACCOUNT = ACCOUNT; this.DATABASE = DATABASE; }
public AutoTreader(ref Archive ARCHIVE, ref OpenRatesBlotter ORBlotter, ref OpenDealsBlotter ODBlotter, ref OpenSettingsBlotter OSBlotter, ref Account ACCOUNT) { this.ARCHIVE = ARCHIVE; this.ODBlotter = ODBlotter; this.ORBlotter = ORBlotter; this.OSBlotter = OSBlotter; this.ACCOUNT = ACCOUNT; this.ANALYSIS = new Analysis(ref ARCHIVE, ref ACCOUNT); foreach (TimeFrame TFrame in ARCHIVE.LTFrames) { DATA.Add(TFrame, new ConcurrentDictionary <string, ChartPointPredition>()); } }