Mathieu2301 / TradingView-API

📈 Get real-time stocks from TradingView
1.61k stars 354 forks source link

Invite Only Indicators #172

Open ciruegas opened 1 year ago

ciruegas commented 1 year ago

How can I get values from invite only indicators? They won't show up using the searchIndicator function.

MakonDev commented 1 year ago

Also curious to know about this, I'm not able to see my invite only indicators either

frankis commented 1 year ago

Haven't started look into the code, but maybe the following still makes sense:

Invitate Only Indicators may be published either publicly or private.

If the maker decides to publish an invite only indicator private, it won't be indexd and do not show up in search. The only way to get it, is by knowing its direct URL.

nybblez0x42697A commented 1 year ago

Go to a tradingview chart and click on the "indicators" button to bring up the list of available indicators. Then select the "invite-only" indicators. Once you see your list of invite-only indicators, bring up developer tools with f12 and do a ctrl+f and search for "pub;". This will find all instances of 'pub;', which will lead you to the invite-only indicators you see in the GUI. The indicator id value is directly after any of the 'data-id=' values.

If you need to see what the indicator inputs are, you can use this:

function getIndicData(indicator) {
  return new Promise((res) => {
    const STD = new chart.Study(indicator);

    console.log(indicator.description);
    console.log(indicator.inputs);

    STD.onUpdate(() => {
      res(STD.periods);
      console.log(`"${indicator.description}" done !`);
    });
  });
}

To set the values from what the defaults are, just add something like this to the function:

indicator.inputs['in_2']['value'] = <your_value_here>;
danielgroen commented 8 months ago

i created a PR for this. so you can get all your private indicators with 1 call.

i also created a example script for it: it is located in: examples/getinviteOnlyScripts.js

Just install my version via: npm i @mathieuc/tradingview@github:danielgroen/TradingView-API

PR: https://github.com/Mathieu2301/TradingView-API/pull/228

0xhex commented 7 months ago

i created a PR for this. so you can get all your private indicators with 1 call.

i also created a example script for it: it is located in: examples/getinviteOnlyScripts.js

Just install my version via: npm i @mathieuc/tradingview@github:danielgroen/TradingView-API

PR: #228

how to get invite only scripts? TradingView.getPrivateIndicators TradingView.searchIndicator

not working