Skip to content

TypeError: indicators.atr.calculate is not a function #60

@sky00781

Description

@sky00781

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()
})();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions