public VWMA VWMA(DataSeries input, int period) { return(VWMA(Datas[0], input, period)); }
public VWMA VWMA(Data data, DataSeries input, int period) { return(Indicator.VWMA(data.V, input, period)); }
public static double TBAverage(this Strategy stra, DataSeries input, int Begin, int Length) { return(input.Average(Begin, Length)); }
protected override void Init() { volSum = new DataSeries(Input); }
public StochRSI StochRSI(DataSeries input, int period) { return(Indicator.StochRSI(input, period)); }
public static double TBLowest(this Strategy stra, DataSeries input, int Begin, int Length) { return(input.Lowest(Begin, Length)); }
DataSeries Close; //只在Close被修改时才会触发指标计算,以避免多个input造成指标计算多次的性能问题. protected override void Init() { Close = Input; Typical = new DataSeries(this.Input); sma = SMA(Typical, Period); }
public RSquared RSquared(DataSeries input, int period) { return(Indicator.RSquared(input, period)); }
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)); }
public TSF TSF(DataSeries input, int forecast, int period) { return(Indicator.TSF(input, forecast, period)); }
protected override void Init() { max = Highest(Input, Period); min = Lowest(Input, Period); tmpSeries = new DataSeries(Input); }
public FisherTransform FisherTransform(DataSeries input, int period) { return(Indicator.FisherTransform(input, period, PriceTick)); }
protected override void Init() { close = Input; }
public TSI TSI(DataSeries input, int fast, int slow) { return(Indicator.TSI(input, fast, slow)); }
/// <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)); }
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)); }
public WMA WMA(DataSeries input, int period) { return(Indicator.WMA(input, period)); }
public DEMA DEMA(DataSeries input, int period) { return(Indicator.DEMA(input, period)); }
/// <summary> /// 比较输入序列是否相同 /// </summary> /// <param name="input"></param> /// <returns></returns> public bool EqualsInput(DataSeries input) { return(Input.Equals(input)); }