MCPcopy
hub / github.com/Mathieu2301/TradingView-API / getIndicData

Function getIndicData

examples/MultipleSyncFetch.js:16–29  ·  view source on GitHub ↗
(indicator)

Source from the content-addressed store, hash-verified

14});
15
16function 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...');

Callers

nothing calls this directly

Calls 2

setMarketMethod · 0.80
onUpdateMethod · 0.45

Tested by

no test coverage detected