anandanand84 / technicalindicators

A javascript technical indicators written in typescript with pattern recognition right in the browser
MIT License
2.14k stars 557 forks source link

MACD #190

Closed krokhale closed 5 years ago

krokhale commented 5 years ago

Just trying to wrap my head around this. Any help will be appreciated! I have a pretty simple data set:

[{minute: 1, closing: 112}, {minute: 2, closing: 112.5},...]

and so on.

According to the docs for MACD:

    let macdInput = {
                values            :[112, 112.5],
                fastPeriod        : 12,
                slowPeriod        : 26,
                signalPeriod      : 9,
                SimpleMAOscillator: false,
                SimpleMASignal    : false,                
            };

Is my assumption for values in macd input correct? I am just plugging in the closing prices for each minute in there as shown above in my sample data.

Am i missing something?

anandanand84 commented 5 years ago

yes it is correct.

krokhale commented 5 years ago

Thanks!