Fourier extrapolation of price – indicator MetaTrader 5

Fourier extrapolation of price
A multi-harmonic (or multi-tone) trigonometric model of a price series x[i], i=1..n, is given by: x[i] = m + Sum( a[h]*Cos(w[h]*i) + b[h]*Sin(w[h]*i), h=1..H ) where: x[i] – past price at i-th bar, total n past prices; m – bias; a[h] and b[h] – scaling coefficients of harmonics; w[h] – frequency of a harmonic; h – harmonic