public CalculateAverageValues(string folderPath, List <TicketInfo> tickets, RangePeriod averagePeriod = 0) { FolderPath = folderPath; Tickets = tickets; AccuracyPeriod = averagePeriod; AverageValsDictionary = new Dictionary <StringDateTimeKey, TicketAtRange>(); }
public RangeBarBuilder(BarsInfo info) : base(info) { _period = (info.Period as RangePeriod) ?? throw new ArgumentException("period"); _tickSize = info.Instrument.MinPriceIncrement; _rangeInPoints = info.Instrument.IncrementsToPoints(_period.TicksPerBar); }
public static string RangePeriodToString(this RangePeriod period) { switch (period) { case RangePeriod.Hour: return("Час"); case RangePeriod.Day: return("День"); case RangePeriod.Month: return("Месяц"); case RangePeriod.AllTime: return("Всё время"); default: return(""); } }
public StringDateTimeKey(string name, DateTime dateTimeValue, RangePeriod accuracyPeriod = 0) { Name = name; DateTimeValue = dateTimeValue; AccuracyPeriod = accuracyPeriod; }