robswc / tradingview-webhooks-bot

a framework 🏗 for trading with tradingview webhooks!
http://tvwb.robswc.me
GNU General Public License v3.0
603 stars 182 forks source link

Very excited! #1

Open LPX55 opened 5 years ago

LPX55 commented 5 years ago

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!

robswc commented 5 years ago

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!

LPX55 commented 5 years ago

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

robswc commented 5 years ago

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.

mbmarx commented 4 years ago

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.

robswc commented 4 years ago

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.

LPX55 commented 4 years ago

@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.

recycletechno commented 4 years ago

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 ))

robswc commented 4 years ago

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!

programjio commented 4 years ago

@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 commented 4 years ago

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 commented 4 years ago

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

rd350 commented 4 years ago

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

dorienh commented 1 year ago

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.