Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,24 @@ tulind.indicators.sma.indicator([close], [3], function(err, results) {
});
```

Using Promise Wrapper:

``` js

var tulind = require('tulind');
var { promisify } = require('util');


//Promisify the simple moving average
//You can promisify any indicator and use it like this
const sma_async = promisify(tulind.indicators.sma.indicator);

var sma_inc = async (close) => {
var results = await sma_async([close], [3]);
return results ;
};

```


Example of calculating the Stochastic Oscillator:
Expand Down