Пример #1
0
 public VWMA VWMA(DataSeries input, int period)
 {
     return(VWMA(Datas[0], input, period));
 }
Пример #2
0
 public VWMA VWMA(Data data, DataSeries input, int period)
 {
     return(Indicator.VWMA(data.V, input, period));
 }
Пример #3
0
 public static double TBAverage(this Strategy stra, DataSeries input, int Begin, int Length)
 {
     return(input.Average(Begin, Length));
 }
Пример #4
0
 protected override void Init()
 {
     volSum = new DataSeries(Input);
 }
Пример #5
0
 public StochRSI StochRSI(DataSeries input, int period)
 {
     return(Indicator.StochRSI(input, period));
 }
Пример #6
0
 public static double TBLowest(this Strategy stra, DataSeries input, int Begin, int Length)
 {
     return(input.Lowest(Begin, Length));
 }
Пример #7
0
        DataSeries Close;           //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题.

        protected override void Init()
        {
            Close   = Input;
            Typical = new DataSeries(this.Input);
            sma     = SMA(Typical, Period);
        }
Пример #8
0
 public RSquared RSquared(DataSeries input, int period)
 {
     return(Indicator.RSquared(input, period));
 }
Пример #9
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));
 }
Пример #10
0
 public TSF TSF(DataSeries input, int forecast, int period)
 {
     return(Indicator.TSF(input, forecast, period));
 }
Пример #11
0
 protected override void Init()
 {
     max       = Highest(Input, Period);
     min       = Lowest(Input, Period);
     tmpSeries = new DataSeries(Input);
 }
Пример #12
0
 public FisherTransform FisherTransform(DataSeries input, int period)
 {
     return(Indicator.FisherTransform(input, period, PriceTick));
 }
Пример #13
0
 protected override void Init()
 {
     close = Input;
 }
Пример #14
0
 public TSI TSI(DataSeries input, int fast, int slow)
 {
     return(Indicator.TSI(input, fast, slow));
 }
Пример #15
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));
 }
Пример #16
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));
        }
Пример #17
0
 public WMA WMA(DataSeries input, int period)
 {
     return(Indicator.WMA(input, period));
 }
Пример #18
0
 public DEMA DEMA(DataSeries input, int period)
 {
     return(Indicator.DEMA(input, period));
 }
Пример #19
0
 /// <summary>
 /// 比较输入序列是否相同
 /// </summary>
 /// <param name="input"></param>
 /// <returns></returns>
 public bool EqualsInput(DataSeries input)
 {
     return(Input.Equals(input));
 }