module

Math::MACD

Instance methods

macd(n : Int)

Computes the MACD (sliding mean) over N values. It will return another list of size - n + 1 elements, because it is not possible to computes the n/2 first and lasts means. NOTE for now it is impossible to computes a MACD with a pair window (n should be odd)

TODO: maybe computing a reduced MACD is good solution against reduced returns ?

Source