You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The output of SMA(10) is 135.5, and it is wrong.
But I used the same json data to find SMA10 by python talib module , the output is 135.91 and it is correct.
Here is my test script
var talib = require('talib');
var util = require('util');
console.log("TALib Version: " + talib.version);
// var request = require('request');
var marketData = {
"c": [
130.7,
131.0,
127.3,
129.3,
135.5,
139.7,
139.6,
142.0,
142.1,
141.9
]
};
talib.execute({
name: "SMA",
startIdx: 0,
endIdx: marketData.c.length-1,
inReal:marketData.c,
optInTimePeriod: 10
}, function (result) {
var outreal = result.result.outReal;
console.log("SMA(10) Function Results:");
console.dir(outreal.pop());
});
output is
TALib Version: 1.0.0
SMA(10) Function Results:
135.5
The text was updated successfully, but these errors were encountered:
The output of SMA(10) is 135.5, and it is wrong.
But I used the same json data to find SMA10 by python talib module , the output is 135.91 and it is correct.
Here is my test script
output is
The text was updated successfully, but these errors were encountered: