module Math::MACD
Direct including types
Defined in:
lib/math/macd.crInstance Method Summary
-
#macd(n : Int)
Computes the MACD (sliding mean) over N values.
Instance Method Detail
def 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 ?