public static Atr Atr( int startIdx, int endIdx, float[] high, float[] low, float[] close, int timePeriod = 14) { int outBegIdx = default(int); int outNBElement = default(int); double[] outReal = new double[endIdx - startIdx + 1]; var retCode = TACore.Atr( startIdx, endIdx, high, low, close, timePeriod, ref outBegIdx, ref outNBElement, outReal); return(new Atr(retCode, outBegIdx, outNBElement, outReal)); }
public static double[] ATR(int Period, double[] Highs, double[] Lows, double[] Closes) { int outBegIdx = 0; int outNbElement = 0; double[] output = new double[Highs.Length]; var res = TACore.Atr(0, Highs.Length - 1, Highs, Lows, Closes, Period, ref outBegIdx, ref outNbElement, output); return(NormalizeArray(output, Period)); }