talib.js icon indicating copy to clipboard operation
talib.js copied to clipboard

Two questions about this library and solutions

Open NameWjp opened this issue 2 years ago • 0 comments

  1. STOCH error I tried to upgrade Emscripten to 3.x and the problem was solve,However, you need to change the EXPORT_ES6 to 0 Delete code in Makefile -e '$$ d'
  2. Cant interpret output For the following code in the template
const reqParamsLen = api.inputs.map(({ name }) => params[name].length);

Change to

const reqParamsLen = api.inputs.map(({ name }) => Math.max(params[name].length - 1, 0));

For the following code in the template

const data = Array.from(current.array.data.slice(0, outNBElement));

Change to

const data = new Array(outBegIdx).fill(0).concat(Array.from(current.array.data.slice(0, endIdx - outBegIdx + 1)));

For the following code in the template

const argArray = double_array(endIdx - startIdx);

Change to

const argArray = double_array(endIdx - startIdx + 1);

Problem solved

NameWjp avatar Dec 07 '22 07:12 NameWjp