private void AnalizeDiskData() { try { //Load data from disk first if (Directory.Exists(IsinDir)) { string[] Files = Directory.GetFiles(IsinDir); foreach (string fn in Files) { FileInfo f = new FileInfo(fn); if (f.Length == 0) { File.Delete(fn); Error("Remove empty file " + fn); continue; } Regex newReg = new Regex(@"[\w\W]*([0-9]{4}_[0-9]{2}_[0-9]{2})_(M1|M5|M15|M30|H1|D1).xml"); Match m = newReg.Match(fn); if (m.Groups.Count > 1) { string stTF = m.Groups[2].ToString(); string stDate = m.Groups[1].ToString(); DateTime dt = CUtilTime.GetDateFromString(stDate); CTimeFrameArray tfa = new CTimeFrameArray(); tfa.FileName = fn; //CSerializator.Read<CTimeFrameArray>(ref tfa); CSerializator.ReadSafe <CTimeFrameArray>(ref tfa); m_dictTFArray.AddTFArray(stTF, dt, tfa); string st = ""; if (tfa.ListTimeFrameInfo.Count == 0) { st = ""; } // Plaza2Connector.GUIBox.ExecuteCandlesUpdate // (new Action(() => Plaza2Connector.GUIBox.GUICandleBox.AddTFArray(tfa.ListTimeFrameInfo[0].Isin, stTF, dt.ToString(), tfa))); } } AnalyzeDiskTF(CUtilTF.IsClosed_M5_M15_M30_TF, m_M5_scale, EnmTF.M5, EnmTF.M1); AnalyzeDiskTF(CUtilTF.IsClosed_M5_M15_M30_TF, m_M15_scale, EnmTF.M15, EnmTF.M5); AnalyzeDiskTF(CUtilTF.IsClosed_M5_M15_M30_TF, m_M30_scale, EnmTF.M30, EnmTF.M15); AnalyzeDiskTF(CUtilTF.IsClosed_H1, m_M30_scale, EnmTF.H1, EnmTF.M30); AnalyzeDiskTFDays(); //CreateCandlesArrays(); } } catch (Exception e) { Error("AnalizeDiskData", e); } }