コード例 #1
0
ファイル: indicators.cs プロジェクト: oghenez/trade-software
        public static BBANDS Series(DataSeries ds, double period, double kUp, double kDn, string name)
        {
            //Build description
            string description = "(" + name + "," + period.ToString() + "," + kUp.ToString() + "," + kDn.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);

            if (obj != null)
            {
                return((BBANDS)obj);
            }

            BBANDS bBands = new BBANDS(ds, period, kUp, kDn, description);

            ds.Cache.Add(description, bBands);
            return(bBands);
        }
コード例 #2
0
ファイル: indicators.cs プロジェクト: oghenez/trade-software
        public static BBANDS Series(DataSeries ds, double period, double kUp, double kDn, string name)
        {
            //Build description
            string description = "(" + name + "," + period.ToString() + "," + kUp.ToString() + "," + kDn.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);
            if (obj != null) return (BBANDS)obj;

            BBANDS bBands = new BBANDS(ds, period, kUp, kDn, description);
            ds.Cache.Add(description,bBands);
            return bBands;
        }