anandanand84 / technicalindicators

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

how to use with Promise or callback #163

Closed SouthRibbleTech closed 5 years ago

SouthRibbleTech commented 5 years ago

I am struggling to use this library in my use case. I have an array of symbols that I map through and for each symbol I want to use the SMA function. The problem is that I have no way to wait for the calculation to finish on each symbol before calculating the next one.

Am I missing something? I have looked everywhere for examples of a callback function that I can promisify with bluebird.

anandanand84 commented 5 years ago

The API is synchronous. You dont need a promise or callback.