Exemple #1
0
        public OpenQuant.API.BarType ConvertBarType(FreeQuant.Data.BarType barType)
        {
            switch (barType)
            {
            case FreeQuant.Data.BarType.Time:
                return(OpenQuant.API.BarType.Time);

            case FreeQuant.Data.BarType.Tick:
                return(OpenQuant.API.BarType.Tick);

            case FreeQuant.Data.BarType.Volume:
                return(OpenQuant.API.BarType.Volume);

            case FreeQuant.Data.BarType.Range:
                return(OpenQuant.API.BarType.Range);

            default:
                throw new NotImplementedException("BarType is not supported : " + (object)barType);
            }
        }
Exemple #2
0
 private BarRequest(FreeQuant.Data.BarType barType, long barSize, bool isBarFactoryRequest)
     : this(EnumConverter.Convert(barType), barSize, isBarFactoryRequest)
 {
 }