Exemple #1
0
 public CalculateAverageValues(string folderPath, List <TicketInfo> tickets, RangePeriod averagePeriod = 0)
 {
     FolderPath            = folderPath;
     Tickets               = tickets;
     AccuracyPeriod        = averagePeriod;
     AverageValsDictionary = new Dictionary <StringDateTimeKey, TicketAtRange>();
 }
Exemple #2
0
 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);
 }
Exemple #3
0
        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;
 }