示例#1
0
            public double GetPrice(BarPrice option)
            {
                switch (option)
                {
                case BarPrice.High:
                    return(this.High);

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

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

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

                case BarPrice.Median:
                    return(this.Median);

                case BarPrice.Typical:
                    return(this.Typical);

                case BarPrice.Weighted:
                    return(this.Weighted);
                }
                return(0.0);
            }
示例#2
0
文件: PnF.cs 项目: zhuzhenping/FreeOQ
        public double GetPrice(BarPrice option)
        {
            double result = 0.0;

            switch (option)
            {
            case BarPrice.High:
                result = this.High;
                break;

            case BarPrice.Low:
                result = this.Low;
                break;

            case BarPrice.Open:
                result = this.Open;
                break;

            case BarPrice.Close:
                result = this.Close;
                break;

            case BarPrice.Median:
                result = this.Median;
                break;

            case BarPrice.Typical:
                result = this.Typical;
                break;

            case BarPrice.Weighted:
                result = this.Weighted;
                break;
            }
            return(result);
        }
示例#3
0
            public double GetPrice(BarPrice option)
            {
                switch (option)
                {
                    case BarPrice.High:
                        return High;

                    case BarPrice.Low:
                        return Low;

                    case BarPrice.Open:
                        return Open;

                    case BarPrice.Close:
                        return Close;

                    case BarPrice.Median:
                        return Median;

                    case BarPrice.Typical:
                        return Typical;

                    case BarPrice.Weighted:
                        return Weighted;
                }
                return 0.0;
            }
示例#4
0
文件: Bar.cs 项目: heber/FreeOQ
		public double GetPrice(BarPrice option)
		{
			double result = 0.0;
			switch (option)
			{
				case BarPrice.High:
					result = this.High;
					break;
				case BarPrice.Low:
					result = this.Low;
					break;
				case BarPrice.Open:
					result = this.Open;
					break;
				case BarPrice.Close:
					result = this.Close;
					break;
				case BarPrice.Median:
					result = this.Median;
					break;
				case BarPrice.Typical:
					result = this.Typical;
					break;
				case BarPrice.Weighted:
					result = this.Weighted;
					break;
			}
			return result;
		}