# calculate()

Calculates the indicator on the specified input without changing the internal state of the indicator.

  • Interface
class MidaIndicator {
    calculate (input: MidaIndicatorIo): Promise<MidaIndicatorIo>;
}
  • Example
import { createIndicator, } from "@reiryoku/mida";

const values = await createIndicator("SMA")
    .calculate([ 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, ]);