コード例 #1
0
ファイル: TRIX.cs プロジェクト: oghenez/trade-software
        /// <summary>
        /// Static method to create Arron DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static TRIX Series(DataSeries ds, double period, string name)
        {
            //Build description
            string description = "(" + name + period.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);
            if (obj != null) return (TRIX)obj;

            //Create indicator, cache it, return it
            TRIX indicator = new TRIX(ds, period, description);
            ds.Cache.Add(description, indicator);
            return indicator;
        }
コード例 #2
0
        /// <summary>
        /// Static method to create Arron DataSeries
        /// </summary>
        /// <param name="ds"></param>
        /// <param name="period"></param>
        /// <param name="name"></param>
        /// <returns></returns>
        public static TRIX Series(DataSeries ds, double period, string name)
        {
            //Build description
            string description = "(" + name + period.ToString() + ")";
            //See if it exists in the cache
            object obj = ds.Cache.Find(description);

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

            //Create indicator, cache it, return it
            TRIX indicator = new TRIX(ds, period, description);

            ds.Cache.Add(description, indicator);
            return(indicator);
        }
コード例 #3
0
 public BasicTRIXRule(DataSeries ds, double period, string name)
 {
     trix = new Indicators.TRIX(ds, period, name);
 }
コード例 #4
0
 public TwoLineTRIXRule(DataSeries ds, double short_period, double long_period, string name)
 {
     short_trix = new Indicators.TRIX(ds, short_period, name);
     long_trix = new Indicators.TRIX(ds, long_period, name);
 }