Beispiel #1
0
 public HMA HMA(DataSeries input, int period)
 {
     return(Indicator.HMA(input, period));
 }
Beispiel #2
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="input"></param>
 /// <param name="period"></param>
 /// <returns></returns>
 public Lowest Lowest(DataSeries input, int period)
 {
     return(Indicator.Lowest(input, period));
 }
Beispiel #3
0
 /// <summary>
 /// 比较输入序列是否相同
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public bool EqualsInput(DataSeries input)
 {
     return(Input.Equals(input));
 }
Beispiel #4
0
 public DMIndex DMIndex(DataSeries input, int smooth)
 {
     return(Indicator.DMIndex(input, smooth));
 }
Beispiel #5
0
 public TSI TSI(DataSeries input, int fast, int slow)
 {
     return(Indicator.TSI(input, fast, slow));
 }
Beispiel #6
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="input"></param>
 /// <param name="fast"></param>
 /// <param name="slow"></param>
 /// <param name="smooth"></param>
 /// <returns></returns>
 public MACD MACD(DataSeries input, int fast, int slow, int smooth)
 {
     return(Indicator.MACD(input, fast, slow, smooth));
 }
Beispiel #7
0
 public EaseOfMovement EaseOfMovement(DataSeries high, DataSeries low, DataSeries volume, DataSeries close, int smoothing, int volumeDivisor)
 {
     if (cacheEaseOfMovement != null)
     {
         var cat = cacheEaseOfMovement;
         for (int idx = 0; idx < cacheEaseOfMovement.Length; idx++)
         {
             if (cacheEaseOfMovement[idx] != null && cacheEaseOfMovement[idx].Smoothing == smoothing && cacheEaseOfMovement[idx].VolumeDivisor == volumeDivisor && cat[idx].High == high && cat[idx].Low == low && cat[idx].Volume == volume && cacheEaseOfMovement[idx].EqualsInput(close))
             {
                 return(cacheEaseOfMovement[idx]);
             }
         }
     }
     return(CacheIndicator <EaseOfMovement>(new EaseOfMovement()
     {
         Smoothing = smoothing, VolumeDivisor = volumeDivisor, High = high, Low = low, Volume = volume, Input = close
     }, ref cacheEaseOfMovement));
 }
Beispiel #8
0
 public StochRSI StochRSI(DataSeries input, int period)
 {
     return(Indicator.StochRSI(input, period));
 }
Beispiel #9
0
        public ChaikinMoneyFlow ChaikinMoneyFlow(DataSeries high, DataSeries low, DataSeries close, DataSeries volume, int period)
        {
            var cat = cacheChaikinMoneyFlow;

            if (cacheChaikinMoneyFlow != null)
            {
                for (int idx = 0; idx < cacheChaikinMoneyFlow.Length; idx++)
                {
                    if (cacheChaikinMoneyFlow[idx] != null && cacheChaikinMoneyFlow[idx].Period == period && cat[idx].High == high && cat[idx].Low == low && cat[idx].Volume == volume && cacheChaikinMoneyFlow[idx].EqualsInput(close))
                    {
                        return(cacheChaikinMoneyFlow[idx]);
                    }
                }
            }
            return(CacheIndicator <ChaikinMoneyFlow>(new ChaikinMoneyFlow()
            {
                Period = period, High = high, Low = low, Volume = volume, Input = close
            }, ref cacheChaikinMoneyFlow));
        }
Beispiel #10
0
 public PFE PFE(DataSeries input, int period, int smooth)
 {
     return(Indicator.PFE(input, period, smooth));
 }
Beispiel #11
0
        DataSeries Close;           //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题.

        protected override void Init()
        {
            Close   = Input;
            Typical = new DataSeries(this.Input);
            sma     = SMA(Typical, Period);
        }
Beispiel #12
0
 public FOSC FOSC(DataSeries input, int period)
 {
     return(Indicator.FOSC(input, period));
 }
Beispiel #13
0
 protected override void Init()
 {
     Close = Input;
 }
Beispiel #14
0
 public RSI RSI(DataSeries input, int period, int smooth)
 {
     return(Indicator.RSI(input, period, smooth));
 }