Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

An idea - Receive webhook alerts from TradingView #11

Open
novapietro opened this issue Nov 12, 2023 · 3 comments
Open

An idea - Receive webhook alerts from TradingView #11

novapietro opened this issue Nov 12, 2023 · 3 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@novapietro
Copy link

Just an idea. It would be useful to connect your code to TradingView Webhook alerts to then automate buy/sell signals
thanks for your work on this.
pietro

@kaush4l
Copy link

kaush4l commented Dec 4, 2023

This should be possible by using AWS lambda.

@rhettre rhettre added enhancement New feature or request help wanted Extra attention is needed labels Dec 4, 2023
@jauel1
Copy link

jauel1 commented Jan 3, 2024

Great job with your code framework, Rhett!

Here is my attempt thus far at incorporating TradingView webhook alerts and AWS lamda, but I've not been successful. I've used TradingView webhook alerts, Chalice/AWS/Lambda (deployed through WSL windows subsystem for Linux commands), and AWS Secrets Manager with Alpaca quite successfully, but I'm having a lot of trouble with Coinbase!

Feel free to review and definitely let me know if you find a way to make it work.

Main.txt (rename it to Main.py) is my main trading file, and config.JSON is my AWS config file. I used Rhett's cb_auth.py and util.py files in addition to mine. I also attached my TradingView JSON payload as well.

Let me know if you have any luck!

main.txt
requirements.txt
config.json
tradingview.JSON

@jauel1
Copy link

jauel1 commented Jan 8, 2024

Okay guys, I figured it out! I am successfully trading tradingview webhook alerts, AWS Lamda and Coinbase with the following:

  1. TradingView webhook alerts (running 4 crypto under the same bot)
  2. WSL - Created new AWS Lamdba project using Chalice (chalice new-project "name")
  3. Updated the JSON.config (you'll need to change the name of the IAM user that you create with permissions for Lamda)
  4. Added a chalicelib folder
  5. Added a coinbase_advanced_traded folder under chalicelib
  6. Add the following files in this folder: init.py (empty file), cb_auth.py (modified), coinbase_client.py (modified), portfolio_detais.py (new file I created), utils.py (modified)
  7. Created a new main trading bot script (app.py) that handles TradingView webhook alerts for long buy and sell orders
  8. Updated the requirements.txt file for use with webhook alerts

I use a Heiken Ashi candle ATR Trailing stop strategy that basically swing trades, printing buy and sell signals (and alerts - webhook messages) that I then receive on AWS Lamda (after deploying with chalice deploy in WSL).

I've attached .txt versions of all files I'm using. Feel free to ask questions, and happy trading!

cb_auth.txt
coinbase_client.txt
config.json
utils.txt
app.txt
tradingview webhook alert.json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants