-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Description
I am trying to wrap a function out of the talib library for the talib.execute(). Example code is https://github.com/oransel/node-talib/blob/master/examples/sma.js
Here is my function with synchronize and can't seem to get it to wait. emaData returns undefined and then the "EMA Function Done." message hits after. What am I missing with the sync wrapper?
`sync(talib, "execute")
var emaData = sync.fiber(function(){
talib.execute({
name: "EMA",
startIdx: 0,
endIdx: series.length - 1,
inReal: series,
optInTimePeriod: 3
}, function (err, result) {
console.log("EMA Function Done.");
return result
});
return emaData
})
console.log(emaData)
`
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels