Technical Analysis with TradingView in Python

NeuralNine · Beginner ·💻 AI-Assisted Coding ·2y ago

Key Takeaways

This video demonstrates how to perform technical analysis with TradingView in Python, utilizing the TradingView TA package and API to retrieve aggregated recommendations and indicators for stocks, currencies, and cryptocurrencies.

Full Transcript

what is going on guys welcome back in this video today we're going to learn how to do technical analysis with trading view in Python so let us get right into it not a g it's red all right so we're going to learn how to do technical analysis using trading view in Python today and this can be done very easily by using a package called trading view- SO trading view- technical analysis this is what it stands for and for those of you who don't know what trading view is it's essentially a platform that provides stock data and currency data and crypto data and allows us to do some technical analysis and one of the most popular tools on this platform is the charting tool the visualization tool which is very feature and you can use it to do some technical analysis and some visualization stuff the package we're going to use today is not going to do any of that it's not going to do any fancy visualizations it's just going to provide us with analyses that's going to provide us with recommendations quote unquote this is of course not Financial advice this video is just programming advice showing you how to do stuff programmatically none of this is to be considered investment advice you should not buy or sell something just because this package says so or the platform says so I'm just showing you how to use it but this package will give us the recommendation or the aggregated recommendations and it's going to give us a lot of interesting indicators we don't have to calculate anything ourselves it's a very easy to usee package so what we need to do first is we need to open up a command line and we need to install this package using pip so either pip or pip 3 install and then we're going to install trading view- ta once you have this installed you can start by importing from Trading view uh let me just see if it's underscore or Dash It's underscore of course since this is an import from Trading view undor ta import and we're going to import ta Handler exchange and IND the no actually not indicator we're going to import Port interval and what we can do now very easily to get information about one specific symbol about a stock for example is we can say something like Tesla equals and then we can say taore Handler and now we can specify a bunch of keyword parameters here and the first one of course is the symbol which in this case is obviously TSLA if you don't know the symbol you can just Google it uh and then we need to specify a screener and an exchange and for the screener now we're just going to specify here America and for the exchange we're going to specify uh NASDAQ like this uh and then we can also specify an interval which is why we import this interval up here so we can say interval equals and this basically defines how granular our data is going to be so how large the time gaps are between the individual data points and we can say here for example we want to have very granular data so interval do interval 1core minute which is quite granular um what we can do now with this Handler object is we can get information uh we can get an analysis from Trading view so we can say Tesla dogor analysis and you will see that this is just a trading view analysis object but what you can get from this object now is a bunch of different things or two very interesting things first of all you can get the summary and the summary is exactly what I said it's a recommendation to do something again not Financial advice here you should not buy sell or hold or anything because of this recommendation here make your own decisions if it was as easy as just following the recommendations and making money everyone would do it people are not doing it so don't rely on that um but what you get here is basically how many uh analyses or recommendations say buy how many say sell or neutral or strong buy or strong sell and then you get an overall aggregated recommendation from the the platform and you can change the ticker symbol here to something else like Microsoft to get in this case a cell again don't do it just because it says so but you can try this now for different stocks like Nvidia you can do it for AMD you can do it for maybe we can get a strong sell or strong buy maybe something like AMC what do we get here oh actually doesn't find it because it's not listed in a nastac uh but maybe we can get Goldman Sachs okay also probably not this in a ndaq um maybe we should go with is snap in a nest DEC I'm not sure no okay but we can go with let's go back to Tesla here you can get the summary like this what you can also get is you can get indicators and this is where the technical analysis actually happens because this is now just an recommendation what you can do is you can say Tesla get analysis and then you can get from this indicators and indicators is a list of a bunch of different technical analysis indicators now I'm not going to pretend that I understand all of them or even most of them but you can see stuff that we have already covered on this channel for example the relative strength indicator I hope it's indicator and not index um maybe it's index I don't know but then we also have the macd the macd signal uh signal so this is the moving average convergence Divergence then we also have exponential and simple moving average so depending on what you know and what you can do something with you also have the volume here High open low close stuff like that um but you just get a list of indicators and you can get a specific one if you're interested for example RSI and then you get the value so you can use this instead of doing your own technical analysis on the data you can just use this package to get it immediately from the platform to just get the raw value on demand of course you will need to have an internet connection but you can do it like that uh instead of calculating it yourself um so this is one thing that you can do the interesting thing is you can also do this for currencies and for crypto and you can can actually do this for a bunch of more things because there's a website I can copy paste it here the website is basically tvdb I think this stands for trading view database and then Brian the. def I think this is probably the username I'm not sure but this website essentially you can search it so for example I can say Nvidia and then you get a bunch of different uh combinations that you can use here so the ticker symbol The Exchange and the screener so those are the Val that you would actually use uh in here in the Constructor to get the respective um asset so this is something you can do you can also say Bitcoin for example BTC or maybe I can say Bitcoin I'm not sure if this is going to be listed here there you go you can say for example crypto Kraken and then BTC usdc um but this doesn't seem to be a complete list oh actually it is you just have to switch but then you can see here here you have the screener crypto different exchanges and then you have different symbols that you can ask for depending on what you're looking for so I can say Bitcoin USD okay actually doesn't work like this but maybe I can say BTC usdt and then you can see I get um for example here from this exchange uh but we can just go ahead and try it now so we can say for example that in specific um I'm interested in binance Bitcoin to usdt so I can say BTC usdt the screener is crypto and the exchange is binance and by doing that I basically get again the data for Bitcoin against usdt which in this case would be sell again doesn't have to be true we can change the interval I think it's one month should also be possible there you go in this case we get a buy because we have less granular data so that's also uh something that you might want to consider when doing the analysis or when getting the recommendation if you want to consider it at all um and of course now this works for currencies as well all you have to do is you have to go to the website you have to look for some something specific for some asset that you want to trade so for example we can say USD Euro for example um and then we can see here we have Forex uh FX IDC USD euro is going to be the dollar against Euro so you can just go ahead and try to get the data USD Euro screener is Forex and then we have the exchange now what you can also do instead of using the string is you can say exchange this is why we imported it exchange and then dot let me just see what the exact keyword was uh Forex like this this also works now this is still called Tesla you can ignore this we can just call it andler so that it's not necessarily a specific stock um but yeah you can see that you get the different indicators here you can also again say handler. get analysis indicators in general and you can use this to make decisions if you are confident that you should be doing that but again not Financial advice programming advice here so yeah this is how you can do technical analysis easily using trading view in Python so that's it for today's video I hope you enjoyed it and hope you learned something if so let me know by hitting a like button and leaving a comment in the comment section down below and of course don't forget to subscribe to this Channel and hit the notification Bell to not miss a single future video for free other than that thank you much for watching see you in the next video and bye

Original Description

In this video today we learn how to easily do technical analysis with TradingView in Python. Website: https://tvdb.brianthe.dev/ DISCLAIMER: This is not investing advice. I am not a professional who is qualified in giving any financial advice. This is a video purely about programming using financial data. ◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾◾ 📚 Programming Books & Merch 📚 🐍 The Python Bible Book: https://www.neuralnine.com/books/ 💻 The Algorithm Bible Book: https://www.neuralnine.com/books/ 👕 Programming Merch: https://www.neuralnine.com/shop 💼 Services 💼 💻 Freelancing & Tutoring: https://www.neuralnine.com/services 🌐 Social Media & Contact 🌐 📱 Website: https://www.neuralnine.com/ 📷 Instagram: https://www.instagram.com/neuralnine 🐦 Twitter: https://twitter.com/neuralnine 🤵 LinkedIn: https://www.linkedin.com/company/neuralnine/ 📁 GitHub: https://github.com/NeuralNine 🎙 Discord: https://discord.gg/JU4xr8U3dm
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from NeuralNine · NeuralNine · 0 of 60

← Previous Next →
1 Visualizing Stock Data With Candlestick Charts in Python
Visualizing Stock Data With Candlestick Charts in Python
NeuralNine
2 Python Beginner Tutorial #1 - Installation and First Program
Python Beginner Tutorial #1 - Installation and First Program
NeuralNine
3 Python Beginner Tutorial #2 - Variables and Data Types
Python Beginner Tutorial #2 - Variables and Data Types
NeuralNine
4 Python Beginner Tutorial #3 - Operators and User Input
Python Beginner Tutorial #3 - Operators and User Input
NeuralNine
5 Python Beginner Tutorial #4 - If Statements and Conditions
Python Beginner Tutorial #4 - If Statements and Conditions
NeuralNine
6 Python Beginner Tutorial #5 - Loops
Python Beginner Tutorial #5 - Loops
NeuralNine
7 Python Beginner Tutorial #6 - Sequences and Collections
Python Beginner Tutorial #6 - Sequences and Collections
NeuralNine
8 Python Beginner Tutorial #7 - Functions
Python Beginner Tutorial #7 - Functions
NeuralNine
9 Python Beginner Tutorial #8 - Exception Handling
Python Beginner Tutorial #8 - Exception Handling
NeuralNine
10 Python Beginner Tutorial #9 - File Operations
Python Beginner Tutorial #9 - File Operations
NeuralNine
11 Python Beginner Tutorial #10 - String Functions
Python Beginner Tutorial #10 - String Functions
NeuralNine
12 Python Intermediate Tutorial #1 - Classes and Objects
Python Intermediate Tutorial #1 - Classes and Objects
NeuralNine
13 Python Intermediate Tutorial #2 - Inheritance
Python Intermediate Tutorial #2 - Inheritance
NeuralNine
14 Python Intermediate Tutorial #3 - Multithreading
Python Intermediate Tutorial #3 - Multithreading
NeuralNine
15 Python Intermediate Tutorial #4 - Synchronizing Threads
Python Intermediate Tutorial #4 - Synchronizing Threads
NeuralNine
16 Python Intermediate Tutorial #5 - Events and Daemon Threads
Python Intermediate Tutorial #5 - Events and Daemon Threads
NeuralNine
17 Python Intermediate Tutorial #6 - Queues
Python Intermediate Tutorial #6 - Queues
NeuralNine
18 Python Intermediate Tutorial #7 - Sockets and Network Programming
Python Intermediate Tutorial #7 - Sockets and Network Programming
NeuralNine
19 Python Intermediate Tutorial #8 - Database Programming
Python Intermediate Tutorial #8 - Database Programming
NeuralNine
20 Python Intermediate Tutorial #9 - Recursion
Python Intermediate Tutorial #9 - Recursion
NeuralNine
21 Python Intermediate Tutorial #10 - XML Processing
Python Intermediate Tutorial #10 - XML Processing
NeuralNine
22 Python Intermediate Tutorial #11 - Logging
Python Intermediate Tutorial #11 - Logging
NeuralNine
23 Python Data Science Tutorial #1 - Anaconda and PyCharm Setup
Python Data Science Tutorial #1 - Anaconda and PyCharm Setup
NeuralNine
24 Python Data Science Tutorial #2 - NumPy Arrays
Python Data Science Tutorial #2 - NumPy Arrays
NeuralNine
25 Python Data Science Tutorial #3 - Numpy Functions
Python Data Science Tutorial #3 - Numpy Functions
NeuralNine
26 Python Data Science Tutorial #4 - Plotting Functions With Matplotlib
Python Data Science Tutorial #4 - Plotting Functions With Matplotlib
NeuralNine
27 Python Data Science Tutorial #5 - Subplots and Multiple Windows
Python Data Science Tutorial #5 - Subplots and Multiple Windows
NeuralNine
28 Python Data Science Tutorial #6 - Matplotlib Styling
Python Data Science Tutorial #6 - Matplotlib Styling
NeuralNine
29 Python Data Science Tutorial #7 - Bar Charts with Matplotlib
Python Data Science Tutorial #7 - Bar Charts with Matplotlib
NeuralNine
30 Python Data Science Tutorial #8 - Pie Charts with Matplotlib
Python Data Science Tutorial #8 - Pie Charts with Matplotlib
NeuralNine
31 Python Data Science Tutorial #9 - Plotting Histograms with Matplotlib
Python Data Science Tutorial #9 - Plotting Histograms with Matplotlib
NeuralNine
32 Python Data Science Tutorial #10 - Scatter Plots with Matplotlib
Python Data Science Tutorial #10 - Scatter Plots with Matplotlib
NeuralNine
33 Python Data Science Tutorial #11 - 3D Plotting with Matplotlib
Python Data Science Tutorial #11 - 3D Plotting with Matplotlib
NeuralNine
34 Python Data Science Tutorial #12 - Pandas Series
Python Data Science Tutorial #12 - Pandas Series
NeuralNine
35 Python Data Science Tutorial #13 - Pandas Data Frames
Python Data Science Tutorial #13 - Pandas Data Frames
NeuralNine
36 Python Data Science Tutorial #14 - Pandas Statistics
Python Data Science Tutorial #14 - Pandas Statistics
NeuralNine
37 Python Data Science Tutorial #15 - Pandas Sorting and Functions
Python Data Science Tutorial #15 - Pandas Sorting and Functions
NeuralNine
38 Python Data Science Tutorial #16 - Pandas Merging Data Frames
Python Data Science Tutorial #16 - Pandas Merging Data Frames
NeuralNine
39 Python Data Science Tutorial #17 - Pandas Queries
Python Data Science Tutorial #17 - Pandas Queries
NeuralNine
40 Python Machine Learning Tutorial #1 - What is Machine Learning?
Python Machine Learning Tutorial #1 - What is Machine Learning?
NeuralNine
41 Python Machine Learning Tutorial #2 - Linear Regression
Python Machine Learning Tutorial #2 - Linear Regression
NeuralNine
42 Python Machine Learning Tutorial #3 - K-Nearest Neighbors Classification
Python Machine Learning Tutorial #3 - K-Nearest Neighbors Classification
NeuralNine
43 Python Machine Learning #4 - Support Vector Machines
Python Machine Learning #4 - Support Vector Machines
NeuralNine
44 Python Machine Learning Tutorial #5 - Decision Trees and Random Forest Classification
Python Machine Learning Tutorial #5 - Decision Trees and Random Forest Classification
NeuralNine
45 Python Machine Learning Tutorial #6 - K-Means Clustering
Python Machine Learning Tutorial #6 - K-Means Clustering
NeuralNine
46 Python Machine Learning Tutorial #7 - Neural Networks
Python Machine Learning Tutorial #7 - Neural Networks
NeuralNine
47 Python Machine Learning Tutorial #8 - Handwritten Digit Recognition with Tensorflow
Python Machine Learning Tutorial #8 - Handwritten Digit Recognition with Tensorflow
NeuralNine
48 Generating Poetic Texts with Recurrent Neural Networks in Python
Generating Poetic Texts with Recurrent Neural Networks in Python
NeuralNine
49 Stock Portfolio Visualization with Matplotlib in Python
Stock Portfolio Visualization with Matplotlib in Python
NeuralNine
50 Analyzing Coronavirus with Python (COVID-19)
Analyzing Coronavirus with Python (COVID-19)
NeuralNine
51 Making Text Images Readable Again with Python and OpenCV
Making Text Images Readable Again with Python and OpenCV
NeuralNine
52 Neural Networks Simply Explained (Theory)
Neural Networks Simply Explained (Theory)
NeuralNine
53 Motion Filtering with OpenCV in Python
Motion Filtering with OpenCV in Python
NeuralNine
54 Top 5 Programming Languages To Learn in 2020
Top 5 Programming Languages To Learn in 2020
NeuralNine
55 Simple TCP Chat Room in Python
Simple TCP Chat Room in Python
NeuralNine
56 Image Classification with Neural Networks in Python
Image Classification with Neural Networks in Python
NeuralNine
57 Edge Detection with OpenCV in Python
Edge Detection with OpenCV in Python
NeuralNine
58 S&P 500 Web Scraping with Python
S&P 500 Web Scraping with Python
NeuralNine
59 Simple Sentiment Text Analysis in Python
Simple Sentiment Text Analysis in Python
NeuralNine
60 Introduction - Algorithms & Data Structures #1
Introduction - Algorithms & Data Structures #1
NeuralNine

This video teaches how to use TradingView with Python for technical analysis, covering installation, importing, and using the TradingView TA package and API to retrieve data and indicators. It also demonstrates how to use the TVDB website to search for assets and retrieve data for different exchanges and symbols.

Key Takeaways
  1. Install TradingView TA package using pip
  2. Import TradingView TA package and its components
  3. Specify symbol, screener, exchange, and interval for analysis
  4. Get analysis and summary from TradingView analysis object
  5. Use TradingView API to get aggregated recommendations and technical analysis for stocks and cryptocurrencies
  6. Retrieve data for Bitcoin against USDT with Binance exchange
  7. Use screener for crypto and Forex with USD Euro
💡 The TradingView TA package and API provide a powerful tool for technical analysis in Python, allowing for easy retrieval of aggregated recommendations and indicators for various assets.

Related Reads

📰
TypeScript Generics Without the Headache
Learn to use TypeScript generics to write reusable code without the complexity
Medium · Programming
📰
I wanted to listen to lo-fi without switching to lo-fi playlists
Learn how to create a lo-fi music experience without switching playlists by applying audio modification techniques
Dev.to · Ben Singer
📰
Spec-Driven Development With AI: How We Ship AI Features Without Losing Engineering Discipline
Learn how to implement spec-driven development with AI to maintain engineering discipline while shipping AI features efficiently
Medium · Machine Learning
📰
GeekNews AI Weekly Deep Dive - 2026-07-06
Learn about myDoo, an IDE that combines VS Code with Claude Code as its default LLM, and explore its potential for streamlining coding and documentation projects
Dev.to AI
Up next
Advanced Tutorial NotebookLM Slides For Powerpoint
Russell Stannard (TTVideos)
Watch →