trading-indicator icon indicating copy to clipboard operation
trading-indicator copied to clipboard

TypeError: indicators.atr.calculate is not a function

Open sky00781 opened this issue 1 year ago • 0 comments

hello,i just use the bellow code,the the error image

anything i missed? how can i fixed it.

my code is :

async function test(){ const { atr, getDetachSourceFromOHLCV } = require('trading-indicator') const { input } = await getDetachSourceFromOHLCV('binance', 'BTC/USDT', '1h', false) // true if you want to get future market console.log(input); let atrData = await atr(14, "close", input) console.log(atrData[atrData.length - 1]) }

(async function(){
// await ready() await test() })();

sky00781 avatar Jan 05 '24 09:01 sky00781