pub fn iterated_balance_ema(
    iterations: u32,
    prev: Balance,
    incoming: Balance,
    smoothing: Fraction
) -> Balance
Expand description

Calculate the iterated exponential moving average for the given balances. iterations is the number of iterations of the EMA to calculate. prev is the previous oracle value, incoming is the new value to integrate. smoothing is the smoothing factor of the EMA.