public void setData(Object obj) { try { parameterSetData parameter = (parameterSetData)obj; String pair = parameter.pair; DateTime begin = parameter.begin; DateTime end = parameter.end; DateTime endFinal = end; end = begin.AddMinutes(2000); DataTable dt = this.loadData(pair, begin, endFinal); this.createSchemaResult(); while (true) { try { Int64 unixbegin = (Int64)(begin.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; Int64 unixend = (Int64)(end.Subtract(new DateTime(1970, 1, 1))).TotalSeconds; this.loadArray(dt.Select("date >= " + unixbegin + " and date <= " + unixend)); Operation operation = indicator.GetOperation(arrayPriceOpen, arrayPriceClose, arrayPriceLow, arrayPriceHigh, arrayVolume); dtResult.Rows.Add(end, pair, arrayPriceClose[arrayPriceClose.Length - 1], operation.ToString(), ""); } catch (Exception ex) { //Logger.log(ex.Message + ex.StackTrace, ""); } begin = begin.AddMinutes(5); end = end.AddMinutes(5); if (end >= endFinal) { break; } } this.saveResult(indicator.getName(), pair); this.dtResult = null; } catch { } }