コード例 #1
0
        /// <summary>
        /// Hold the indicator volume from the underlining indicator
        ///
        /// </summary>

        #region Methods
        public double GetPriceByType(int barNo, PriceSubtype priceType)
        {
            Print(CurrentBar + ":GetPriceByType=" + barNo + "," + priceType);
            double prc = 0;

            switch (priceType)
            {
            case PriceSubtype.Low:
                prc = Bars.GetLow(barNo);
                break;

            case PriceSubtype.High:
                prc = Bars.GetHigh(barNo);
                break;

            case PriceSubtype.Open:
                prc = Bars.GetOpen(barNo);
                break;

            case PriceSubtype.Close:
                prc = Bars.GetClose(barNo);
                break;
            }
            return(prc);
        }
コード例 #2
0
 public void NewSupportResistanceBar(int barNo, SupportResistanceType snrType, PriceSubtype snrPriceType)
 {
     BarNo        = barNo;
     SnRType      = snrType;
     SnRPriceType = snrPriceType;
 }