oransel/node-talib

How to use different input types

Closed this issue · 1 comments

You have an example for ADX, which uses inPriceOHLC, but how does inReal work? I tried passing "real":[ ], but that results in this error.

{ error: 'First argument must contain \'%s\' field' }

The inputs array defined in the explain comes from the underlying technical analysis library used. For ADX, it should be reporting 'inPriceHLC' for inputs. This indicates that the function needs High, Low and Close prices. Once the calculations are completed, it returns array of Real numbers, as indicated in the outputs parameter.

A working example with all the parameters can be found at https://github.com/oransel/node-talib/blob/master/examples/adx.js