Skip to content

Commit

Permalink
Update exaple
Browse files Browse the repository at this point in the history
  • Loading branch information
thanhnguyennguyen committed Jan 31, 2020
1 parent 8c88651 commit 46330fe
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 23 deletions.
6 changes: 5 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@ module.exports = {
macd: macd,
}
const main = async () => {
console.log("RSI 14 on Binance BTC/USDT 15m")
console.log(await rsi(14, "close", "binance", "BTC/USDT", "15m", true))

console.log("SMA 8 on Binance BTC/USDT 15m")
let smaData = await sma(8, "close", "binance", "BTC/USDT", "15m", true)
console.log(smaData[smaData.length - 1])

console.log("Bollinger bands 50, 2 on Binance BTC/USDT 15m")
let bbData = await bb(50, 2, "close", "binance", "BTC/USDT", "15m", true)
console.log(bbData[bbData.length - 2])

console.log("MACD 12 26 9 on Binance BTC/USDT 15m")
let macdData = await macd(12, 26, 9, "close", "binance", "BTC/USDT", "15m", true)
console.log(macdData[macdData.length - 2])
}
main()
main()
49 changes: 27 additions & 22 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"description": "provide trading technical indicator values",
"main": "index.js",
"scripts": {
"start": "echo example to fetch data from binance && node index.js",
"test": "echo \"Error: no test specified\" && exit 1"
},
"repository": {
Expand Down

0 comments on commit 46330fe

Please sign in to comment.