Build an option trading bot with TradingView webhooks, Python, TD Ameritrade API, and AWS Lambda

preview_player
Показать описание
If you don't already have a TradingView Premium account and want to support the channel, use my link to sign up!

In this video, we execute option orders from Python with the TD Ameritrade API. We deploy this logic as an AWS Lambda function and trigger it when AAPL stock is overbought using the RSI indicator in TradingView.

Source Code:

Sign up for TradingView here:

For more tutorials, subscribe to this channel and follow me:

Рекомендации по теме
Комментарии
Автор

If you don't already have a TradingView Premium account and want to support the channel, use my link to sign up!

parttimelarry
Автор

I'm 54 and my wife and I are VERY worried about our future, gas and food prices rising daily. We have had our savings dwindle with the cost of living into the stratosphere, and we are finding it impossible to replace them. We can get by, but can't seem to get ahead. My condolences to anyone retiring in this crisis, 30 years nonstop just for a crooked system to take all you worked for.

Susanne-zuku
Автор

Dont stop, man. These are incredibly informative videos that I'm always stoked to see. Cheers

Anhydrous
Автор

Dude greetings from argentina, i was about to try do a trading bot by myself and was pretty lost. Thanks for the content! Learning a lot!

xellworth
Автор

Thanks Larry you’re channel has phenomenal content! Please keep it up 😁

CarlosWong
Автор

Just wanted to say found you yesterday and loving so much of your content. It's really is the mix right between programming and finance that I was looking for, the production quality is good with the right amt of time per video!

Also love that what you use isn't just old clunky software like mt4 and have such cool ideas of interconnecting systems together :)

exnaruto
Автор

Some cool stuff here Larry! I will have to study all your videos.

ricomajestic
Автор

Can't believe this is free. Thanks a lot man

dipooganla
Автор

My guy. I appreciate you man! Thank you!! So clutch.

temiwale
Автор

You shouldn't let the user of the API that a passphrase is invalid, it should just fail silently, otherwise, you let them/others know that there is a passphrase. You should also check the request headers for the tradingview domain if you can to make sure that the request is coming in through tradingview servers (if possible). Otherwise, very helpful video, thank you for doing this.

thefirstrohitkeshwani
Автор

hi..i have a question..im almost new to tradingview script and before i used mql4 to make indicator or script . i used to make scanner indicator using mql4 and or instance if i insert 10 symboles like eurusd, gbpusd etc and if i set certatin condition it send alert to me when condition met. with tradingivew this kind of scanner can make? i searched but it difficult find such scanner.

infoking
Автор

This all sounds awesome. But I'm curious if you've thought about marketing a monthly membership service for something like this. An automated Stock system that is user friendly where anyone with a tradingview strategy could plug in key data, connect to an exchange and start trading. I'd be interested in being a member.

ABMNATN
Автор

Ultra informative. Planning to do this exact thing with Tradestation. Tradingview is really popular with crypto, but isn't well supported in the commodity futures world. Would be amazing to use this very technique to post a buy/sell indicator signal inside Tradestation, or do direct autotrading through the API.

BfSamuel
Автор

Hi,

Thanks a ton for doing these videos. They are incredibly helpful for someone like me who wants to do Algo trading.
I already have a pretty decent strategy hooked up on TradingView that works good and I've been trying to automate the trading part of it.

I did exactly what you did for the Alpaca API with TradingView and I am ecstatic about it other than the minor hiccup that it takes a few seconds to get filled on market orders so I was trying to do the same with TDAmeritrade.
The one question I have with TD Ameritrade is for Options trading, is there an easy way to get the option symbol from the get_option_chain json return body other than going through the multiple levels of the dictionary that comes out?
It would be great to get just the option symbol from the chain that I get returned (I only ask for one particular strike price) so I can use the orderbuilder template for requesting market option orders rather than manually change the chain every single time it expires.

Thanks a lot :)

dheerajchidambaranathan
Автор

Awesome video. Thanks so much. Question for you...if we have TradingView send multiple alerts to multiple end points containing different indicator data points, then how can we share those data points across functions/end points.

Using your RSI as an example. If we send RSI data to our option/order end point and then send a volume alert to a /volume end point, then how can we access that volume data from the option/order end point/function?

vincentscotti
Автор

Hi, great video and very informative. Quick question do you know how to incorporate a signal from the tdi api that tells the bot when the pdt is over so it won't go far from that limit?
Thanks in advance

JessJOM
Автор

Hi Larry, Can you please explain how do you do a SELL trade for the BUY you just made using tradingview. So it should be a Pair trade (Buy & Sell)

desiben
Автор

Superkool videos thanks a lot. Could you also post some videos on scalping strategies intradat trading and how to get backtesting results?

luvrahooo
Автор

Anything you have seen to track options purchases or interest with Python? Thanks.

kicc
Автор

I was using concept of polling to create alerts. Webhooks sound neat!. One challenge I have is that can we add multiple alerts for different tickers from a spreadsheet? In essence, can we automate it the alert creation process?

ktrades
join shbcf.ru