Esempio n. 1
0
        /// <summary>
        ///
        /// </summary>
        public decimal GetValue(DataValueEnum valueSource)
        {
            if (HasDataValues == false)
            {
                return(decimal.MinValue);
            }

            switch (valueSource)
            {
            case DataValueEnum.High:
                return(this.High);

            case DataValueEnum.Low:
                return(this.Low);

            case DataValueEnum.Average:
                return(this.Average);

            case DataValueEnum.Open:
                return(this.Open);

            case DataValueEnum.Volume:
                return(this.Volume);

            case DataValueEnum.Close:
                return(this.Close);

            case DataValueEnum.BodyHeight:
                return(this.BodyHeight);
            }

            SystemMonitor.NotImplementedWarning("Value enum type not known [" + valueSource.ToString() + "]");
            return(0);
        }
Esempio n. 2
0
        /// <summary>
        /// Provide enum based access to values.
        /// </summary>
        public decimal GetValue(DataValueEnum value)
        {
            switch (value)
            {
                case DataValueEnum.Ask:
                    return Ask;
                case DataValueEnum.Bid:
                    return Bid;
                case DataValueEnum.Volume:
                    return Volume;
            }

            SystemMonitor.Error("Value [" + value.ToString() + "] not recognized.");

            return 0;
        }
Esempio n. 3
0
        /// <summary>
        /// Provide enum based access to values.
        /// </summary>
        public decimal GetValue(DataValueEnum value)
        {
            switch (value)
            {
            case DataValueEnum.Ask:
                return(Ask);

            case DataValueEnum.Bid:
                return(Bid);

            case DataValueEnum.Volume:
                return(Volume);
            }

            SystemMonitor.Error("Value [" + value.ToString() + "] not recognized.");

            return(0);
        }