public void ReceiveCandle(sCandle pCandle) { Candle = pCandle; ATR.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C); BB.ReceiveTick(pCandle.C); CCI.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C); Derivatives.ReceiveTick(pCandle.C); EMA.ReceiveTick(pCandle.C); FMA.ReceiveTick(pCandle.C); HMA.ReceiveTick(pCandle.C); MACD.ReceiveTick(pCandle.C); Momemtum.ReceiveTick(pCandle.C); RSI.ReceiveTick(pCandle.C); Renko.ReceiveTick(pCandle.C); SMA.ReceiveTick(pCandle.C); STARCBands.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C); STDDEV.ReceiveTick(pCandle.C); Slope.ReceiveTick(pCandle.C); StochRSI.ReceiveTick(pCandle.C); Stochastics.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C); Stub.ReceiveTick(pCandle.C); Trend.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C); TrueRange.ReceiveTick(pCandle.O, pCandle.H, pCandle.L, pCandle.C); WMA.ReceiveTick(pCandle.C); }
public void ReceiveTick(double pO, double pH, double pL, double pC) { double min, max; H[tickcount % KPeriods] = pH; L[tickcount % KPeriods] = pL; C = pC; if (tickcount >= KPeriods) { max = H[0]; min = L[0]; for (int i = 0; i < KPeriods; i++) { if (H[i] > max) { max = H[i]; } if (L[i] < min) { min = L[i]; } } K = 100 * ((C - min) / (max - min + 0.000000001)); KSmooth.ReceiveTick(K); if (KSmooth.Value() != 0) { D.ReceiveTick(KSmooth.Value()); } } tickcount++; if (tickcount == (4 * KPeriods)) { // avoid overflow by restricting range of tickcount // when indicator is fully primed // 3*KPeriods satisfies ( tickcount > (KPeriods+KSPeriods+DPeriods) ) // when (KPeriods > KSPeriods) and (KPeriods > DPeriods) tickcount = 3 * KPeriods; } }
public void ReceiveTick(double Val) { longSMA.ReceiveTick(Val); shortSMA.ReceiveTick(Val); }
public void ReceiveTick(double Val) { tick = Val; SMA.ReceiveTick(Val); History.Add(Val); }
public void ReceiveTick(double pO, double pH, double pL, double pC) { TP = (pH + pL + pC) / 3; TPSMA.ReceiveTick(TP); History.Add(TP); }
public void ReceiveTick(double pO, double pH, double pL, double pC) { ATR.ReceiveTick(pO, pH, pL, pC); SMA.ReceiveTick((pH + pL + pC) / 3); }