public void RunSingle() { //Laptop // string css = @"Data Source=ALSI-PC\;Initial Catalog=AlsiTrade;Integrated Security=True"; //PC string css = @"Data Source=PIETER-PC\;Initial Catalog=AlsiTrade;Integrated Security=True"; AlsiUtils.Data_Objects.GlobalObjects.CustomConnectionString = css; // DateTime s = new DateTime(2006, 01, 01); // DateTime e = new DateTime(2006, 12, 15); DateTime s = new DateTime(2012, 1, 1); DateTime e = new DateTime(2013, 12, 29); var prices = AlsiUtils.DataBase.readDataFromDataBase(GlobalObjects.TimeInterval.Minute_2, AlsiUtils.DataBase.dataTable.MasterMinute, s, e, false); Debug.WriteLine("Start Date " + prices[0].TimeStamp); //for (int x = 2; x < 50; x++) //{ AlsiUtils.Strategies.Parameter_EMA_Scalp E = new AlsiUtils.Strategies.Parameter_EMA_Scalp() { A_EMA1 = 16, A_EMA2 = 17, B_EMA1 = 43, B_EMA2 = 45, C_EMA = 52, TakeProfit = 450, StopLoss = -300, CloseEndofDay = false, Period = prices.Count, }; //takep = E.TakeProfit; //takel = E.StopLoss; AlsiUtils.Statistics S = new AlsiUtils.Statistics(); S.OnStatsCaculated += new AlsiUtils.Statistics.StatsCalculated(S_OnStatsCaculated); var Trades = AlsiUtils.Strategies.EMA_Scalp.EmaScalp(E, prices, false); Trades = S.CalcBasicTradeStats_old(Trades); var NewTrades = AlsiUtils.Strategies.TradeStrategy.Expansion.ApplyRegressionFilter(10, Trades); NewTrades = S.CalcExpandedTradeStats(NewTrades); // PrintTradesonly(NewTrades); }