tradingview-webhooks-bot icon indicating copy to clipboard operation
tradingview-webhooks-bot copied to clipboard

Very excited!

Open LPX55 opened this issue 6 years ago • 13 comments
trafficstars

Just wanted to stop by and show support for what you are doing. TradingView finally came to its senses and opening up webhooks is huge!

LPX55 avatar Aug 24 '19 18:08 LPX55

thanks a ton! I'll definitely be adding to it and fixing issues as they come up. Sadly I started working on custom frameworks because of a lack of something like webhooks so its a little late for me :( BUT this will help tons of people that may want to forward test some prototypes!

robswc avatar Aug 24 '19 22:08 robswc

Yeah, there were tons of projects trying to crack TV's data... now if only they allow strategies to set off alerts... boggles my mind

LPX55 avatar Aug 24 '19 23:08 LPX55

oh for sure! I actually have/had a system in place to "scrape" the alerts as they came in, it was ugly... it was messy... but it worked! just not feasible for public use. I might clean it up and release it though so those on free plans can try their strats.

robswc avatar Aug 24 '19 23:08 robswc

Thanks a ton for the update. Just would like to know if there is a possibility route the webhook to local system without ngrok or any paid tools . As you know Ngrok charges are more . Since the chart will be running in browser somehow ,can the python decode the webhook link (may be provide the system IP to receive the data) and extract the message for processing .Please provide your input.

mbmarx avatar Sep 26 '19 06:09 mbmarx

Hey @mbmarx Its entirely possible, just not recommended. A basic Ngrok account should be free, IIRC.

You can definitely run it without ngrok, if you just run the python file without running ngrok it will run on your local machine. You can change the IP address (0.0.0.0) to your public IP address, you can then send webhooks to your public IP address.

I found though that doing this was a bit difficult, as you needed to mess with firewalls and other problems that come with running it that way.

robswc avatar Sep 26 '19 15:09 robswc

@mbmarx Before the webhook alerts are sent out the data is actually stored on your local cache (you can find it through Chrome Inspector under Application) if that's what you meant.

LPX55 avatar Oct 05 '19 02:10 LPX55

Thank for webhooks! It's really awesome. Is it possible to fire alerts/webhooks on my own custom PineScript strategies in order to receive trade signals from the strategy and forward them to exchange via ccxt for example? When I try to insert "alertcondition" instruction I always get "Cannot use 'alertcondition' in local scope." error. I think the answer is near and "the truth is out there" but do not know where exactly ))

recycletechno avatar Nov 15 '19 12:11 recycletechno

Hey @recycletechno ! What you're trying to do is totally possible. One of the problems you might be having is alertcondition only works on strategy pinescripts, not sure if that's your issue but it could be one of them.

The specific error you're getting means you might be trying to use alertcondition in a local scope (aka a function or indented section) perhaps you could move the alertcondition function to a non indented section? (out of a local scope into the main one)

If that doesn't work let me know!

robswc avatar Nov 15 '19 21:11 robswc

@mbmarx Before the webhook alerts are sent out the data is actually stored on your local cache (you can find it through Chrome Inspector under Application) if that's what you meant.

Thank you ,this may help me a lot . Did you mean this Web Inspector - Google Chrome extension to check this.

programjio avatar Nov 27 '19 06:11 programjio

Hey @mbmarx Its entirely possible, just not recommended. A basic Ngrok account should be free, IIRC.

You can definitely run it without ngrok, if you just run the python file without running ngrok it will run on your local machine. You can change the IP address (0.0.0.0) to your public IP address, you can then send webhooks to your public IP address.

I found though that doing this was a bit difficult, as you needed to mess with firewalls and other problems that come with running it that way.

Thank you for your feedback. Can you help and share the code snippet of doing this in the local without any external tools like ngrok.

Is there a easy way to do using SSH method as well ,your thought please.

programjio avatar Nov 27 '19 06:11 programjio

Thank for webhooks! It's really awesome. Is it possible to fire alerts/webhooks on my own custom PineScript strategies in order to receive trade signals from the strategy and forward them to exchange via ccxt for example? When I try to insert "alertcondition" instruction I always get "Cannot use 'alertcondition' in local scope." error. I think the answer is near and "the truth is out there" but do not know where exactly ))

Alertcondition cannot be used in any if conditions ,try it with separately

programjio avatar Nov 27 '19 06:11 programjio

Hey @Robswc, I have setup a dockerfile that will almost automate the setup. Could I get access to send merge request?

rd350 avatar Jun 28 '20 05:06 rd350

Hey @mbmarx Its entirely possible, just not recommended. A basic Ngrok account should be free, IIRC. You can definitely run it without ngrok, if you just run the python file without running ngrok it will run on your local machine. You can change the IP address (0.0.0.0) to your public IP address, you can then send webhooks to your public IP address. I found though that doing this was a bit difficult, as you needed to mess with firewalls and other problems that come with running it that way.

Thank you for your feedback. Can you help and share the code snippet of doing this in the local without any external tools like ngrok.

Is there a easy way to do using SSH method as well ,your thought please.

Where do we set it in docker settings? It shows 0.0.0.0 for me too when it starts running (with docker-compose). Trying to run on localhost now for dev and testing, then will run on digitalocean.

dorienh avatar May 08 '23 10:05 dorienh