Mathieu2301 / TradingView-API

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

Can't load indicator - (Study error: Study not allowed in this connection) #182

Open royalbrawler opened 1 year ago

royalbrawler commented 1 year ago

Describe the bug Im getting the "onError" event triggered when loading a Public Indicator with - "TradingView.getIndicator()".

Study error: Study not allowed in this connection ams1-charts-22-webchart-1@ams1-compute-22 Study error: [ 'Study not allowed in this connection',
'fra2-charts-34-webchart-13@fra2-compute-34' ]

To Reproduce you can reproduce the Error with the [GraphicIndicator.js] in the /examples folder

Environment:

Additional context Used to work fine until today.. Most likely tradingview changed something on their side (api) ?

kabaogluemre commented 1 year ago

I am having same issue as well, the issue started to happen just today.

thermohaline commented 1 year ago

Having the same issue

CryptoTr4der commented 1 year ago

Got the same error top since today. Any idea how to fix this? :-(

royalbrawler commented 1 year ago

Hey trader fellas, I found a temporary fix that works on my side (in my use cases).

just change this 228 line in client.js from this.#ws = new WebSocket(wss://${server}.tradingview.com/socket.io/websocket, { to this.#ws = new WebSocket(wss://${server}.tradingview.com/socket.io/websocket?&type=chart, {

thermohaline commented 1 year ago

Worked for me! Appreciate it good sir

kabaogluemre commented 1 year ago

Worked for me as well, thanks !

CryptoTr4der commented 1 year ago

For me too, thanks ;)

qrq commented 1 year ago

me too, thanks 👍🏼

lordbritish888 commented 1 year ago

This bug seems to be back. I changed line 228 but now get 'Study not allowed in this connection nje1-charts-30-webchart-10@nje1-compute-30'

apocoder commented 1 year ago

This bug seems to be back. I changed line 228 but now get 'Study not allowed in this connection nje1-charts-30-webchart-10@nje1-compute-30'

Pull the main man, they fixed