(indicator)
| 14 | }); |
| 15 | |
| 16 | function getIndicData(indicator) { |
| 17 | const chart = new client.Session.Chart(); |
| 18 | chart.setMarket('BINANCE:DOTUSDT'); |
| 19 | const STD = new chart.Study(indicator); |
| 20 | |
| 21 | console.log(`Getting "${indicator.description}"...`); |
| 22 | |
| 23 | return new Promise((res) => { |
| 24 | STD.onUpdate(() => { |
| 25 | res(STD.periods); |
| 26 | console.log(`"${indicator.description}" done !`); |
| 27 | }); |
| 28 | }); |
| 29 | } |
| 30 | |
| 31 | (async () => { |
| 32 | console.log('Getting all indicators...'); |