Technical Analysis Library in Python Tutorial

  Рет қаралды 50,399

Part Time Larry

Part Time Larry

3 жыл бұрын

Like the video? Support my content by checking out Interactive Brokers using the link below:
www.interactivebrokers.com/mk...
Buy Me a Drink: www.buymeacoffee.com/parttime...
Also, I will be starting a spinoff channel on AI in music, art, and gaming in 2023. Subscribe at: / @parttimeai
In this video, we demonstrate the Python TA package. Yet another technical analysis library for Python.

Пікірлер: 85
@parttimelarry
@parttimelarry 3 жыл бұрын
Like the video? Support my content by checking out Interactive Brokers using the link below: www.interactivebrokers.com/mkt/?src=ptlPY1&url=%2Fen%2Findex.php%3Ff%3D1338 If you like this video and want to support the channel: Buy Me a Drink: www.buymeacoffee.com/parttimelarry Note: In this demo, it turns out I was running an early/old version of ta, which has the strange behavior of computing the moving average for the Bollinger Bands even for the first bar. So for the first bar, the average was equal to the closing price of the first bar. For the second bar, the average was the (first + second bar close) / 2, and so on. After upgrading to version 0.7 the numbers are now what you would expect - NaN values until there are 20 bars to average. Thanks to Todd below for pointing this out.
@sriramkrishna6853
@sriramkrishna6853 3 жыл бұрын
Larry is the best teacher ever. Such amazing videos and value as always.
@LongTu167
@LongTu167 7 ай бұрын
This is amazing video. Thank you very much Larry!
@investvest4571
@investvest4571 2 жыл бұрын
Awesome tutorial! Easy to follow. Thank you.
@thedude3369
@thedude3369 3 жыл бұрын
Thank you for making these your videos are excellent and very informative.
@nishadseeraj7034
@nishadseeraj7034 3 жыл бұрын
Just wanted to say Larry that I really appreciate your videos! I come from a stats and finance background so while I understand the finance concepts in theory and on paper with all of the nitty gritty maths , translating to code has never been easy for me. I have some experience but your videos are super and has made the transition so much smoother! Thanks mate and I'm looking forward for more stuff!
@k2icc
@k2icc 3 жыл бұрын
You make this look very easy, but I know you do know the stuff. Thanks a lot for taking the time to share it. That speeds up anyone learning experience by a lot.
@typeer
@typeer 3 жыл бұрын
back again! great as always thanks larry
@lorenzoquadrelli7237
@lorenzoquadrelli7237 3 жыл бұрын
Exactly what I was looking for! Glad you decided to cover this library just now. Yesterday I was working on a bot hardcoding all the formula and math 😆 and than I found your video. It's gonna save me a lot of headaches 🤞🏽 cheers!
@alibulus4382
@alibulus4382 2 жыл бұрын
You are amazing dude.
@cetilly
@cetilly 3 жыл бұрын
Awesome topic and very well presented. I also prefer TA; good call
@scottv6506
@scottv6506 3 жыл бұрын
Larry you are a fantastic and very clear teacher. I appreciate what I am picking up from your channel
@parttimelarry
@parttimelarry 3 жыл бұрын
Thank you!
@InsertGreatChannelName
@InsertGreatChannelName 3 жыл бұрын
Nice, my man back again with Ta
@glopessantos1
@glopessantos1 3 жыл бұрын
thanks a lot for your contribution
@lokendrayadav91
@lokendrayadav91 3 жыл бұрын
Hey man trust me you are awesome 😎
@taraspanamarev6281
@taraspanamarev6281 3 жыл бұрын
Great content! Can't wait for the next video! Would be very interesting if you back-test your upcoming supertrend strategy with backtrader
@javidhb
@javidhb 2 жыл бұрын
it was extremely useful.... tnx
@kg6itc
@kg6itc Жыл бұрын
Be GREAT to see a video on Python Trading Bot using TA lib that alerts on price crossing MA, and MA's crossing.
@tak68tak
@tak68tak 3 жыл бұрын
Awesome as usual. twelvedata is awesome btw. You can get a Pandas dataframe simply by from twelvedata import TDClient td = TDClient(apikey=twelve_key) ts = td.time_series('symbol'= 'AAPL') ts.as_pandas()
@kg6itc
@kg6itc Жыл бұрын
Was there a part 2 for this? This is GREAT! Thanks!
@jeppe7328
@jeppe7328 2 жыл бұрын
YES LARRY! NICE TO SEEYOU AGAIN :D
@BenjaminBalaj-yp8zk
@BenjaminBalaj-yp8zk Жыл бұрын
A sub to you my good sir!
@faridparvez
@faridparvez Жыл бұрын
Gr8 info vid. Please make a vid on roadmap to learning python specifically for stock chart analysis , getting trade signals using chart and statistical analysis of stocks. I mean make a vid on course tailored cut for only stocks analysis. Regards Farid
@faridparvez
@faridparvez Жыл бұрын
Great video, very clear. Please make a video on roadmap to learning python from scratch, specifically for stock analysis, chart analysis, getting trade signals using charts and statistical analysis of stocks. I mean create a roadmap on the course tailored cut for only stock analysis . Regards Farid
@IBetraye
@IBetraye 3 жыл бұрын
Hey Larry, first of all, great videos! You've helped me big time. How would you loop through a df where multiple coin pares are available, making it so that the ta trend functions are reapplied and recalculated on every pair in the df? Thanks!
@maxxgray2539
@maxxgray2539 3 жыл бұрын
Looking forward on your next videos, are you going to use backtrader to test your strategies?
@connorpatricks4922
@connorpatricks4922 3 жыл бұрын
Hey Larry thanks a million for you videos man! Your lectures are so easy to follow and you explain even the most complex concepts to clearly yu make itso easy. Yu are a genius man. Im trying to transfer your supertrend code into freqtrade but its not working for me. I like freqtrade coz yu can give bot a select number of assets to trade on instead of running many bot instances. Or maybe is it possible to add more assets for bot to monitor in this supertrend strategy. Your ecample has eth/usdt just wondering if adding more would work. Thanks dude
@vamsikrishna8132
@vamsikrishna8132 3 жыл бұрын
when is the next video coming? eager to learn
@unyimeakn9615
@unyimeakn9615 3 жыл бұрын
if you are having issues installation ccxt on windows. Open cmd has admin.
@abdullahb4367
@abdullahb4367 3 жыл бұрын
awesome video as always. is there a way to trade based on Renko charts in this python?
@Ligariuz
@Ligariuz 3 жыл бұрын
What lib did You recommend to plot this?, like trading view?
@MarcusVinicius-lq3fe
@MarcusVinicius-lq3fe Жыл бұрын
Hi Larry I have watched all videos from API Binance Tutorial very nice! I have a question: which method returns me the market current/real time PERCENTAGE variation (from Ethereum for example) ? I got that just doing web scraping using selenium but I would like to get this info using the API.
@in_the_6ix
@in_the_6ix 3 жыл бұрын
Hi Larry - awesome video - thanks so much! Curious behavior in the BollingerBands on my Windows PC (Python 3.8.4)... When I run "bars = exchange.fetch_ohlcv('ETH/USDT', limit=20)", I get NaN values for upper_band, lower_band, moving_average (except for the last row). If I remove the limit and use print(df[-20:]), the values are fine. Is anyone else seeing this output?
@FranklinMinty
@FranklinMinty 3 жыл бұрын
Yes...Larry is a Wizard and can pull data from the past to calculate MA on the first bar. We're mere muggles...
@IrfanA7861
@IrfanA7861 3 жыл бұрын
Yes I am having the same issue
@IrfanA7861
@IrfanA7861 3 жыл бұрын
@@FranklinMinty Yes seriously how he got the 20 bars average?
@parttimelarry
@parttimelarry 3 жыл бұрын
Hey let me check on what the deal is here, you are right the result was strange but I didn't catch it while I was recording.
@parttimelarry
@parttimelarry 3 жыл бұрын
Great catch. It looks like the version I had on this machine is very early/old. I had ta version 0.5.11. The values you got are the behavior I would expect. On the old version, instead of filling the first X values with NaN, it averaged what it had so far. So the first value of the moving average was equal to the first close. The second value of the moving average was the (first close + second close) / 2 and so forth. I upgraded the package -- ran a pip3 install --upgrade ta and now I have ta version 0.7. I re-ran with newer data and the behavior is now what you have and what I would expect. I will make a note of this in the next video and in a pinned comment. Thanks for pointing this out.
@ShujaathKhan
@ShujaathKhan 3 жыл бұрын
How diff is this compared to finta or talib?
@fivetenash
@fivetenash 3 жыл бұрын
yeeee
@ayhanataman
@ayhanataman Жыл бұрын
can we use for stock ?which library can i use
@aryalsubsc
@aryalsubsc 2 ай бұрын
I have local database table with Symbol, Date, Open, High, Low, Close, Volume columns. getOHLCfromDB(symbol, startdate, enddate) is the fuction which will extract OHLC data. I would like handler to work on extracted dataframe df. Is there possibilities to analysis for my local data.
@adeisidaemon
@adeisidaemon 3 жыл бұрын
This library is a joy to use compared to ta-lib, it has a vortex indicator for a start, you don't have to dick about with dependencies on 64bit Windows, it is certainly more Pythonic like you say and it isn't as buggy. Cheers Larry.
@ai.simplified..
@ai.simplified.. 3 жыл бұрын
Is it possible to automate everything for online trading like a bot?
@Invibcible
@Invibcible Жыл бұрын
You made 3 intresting stocks scanner videos in the past using TA-Lib, I could't install that library and I want to do a stocks scanner using the TA library in this video and I don't know how to start. Are you planning to remake the stocks scanner videos using TA?
@maheshguntty
@maheshguntty 2 жыл бұрын
Hello bor can u give example of SMA cross over using Pandas_ta plz
@jackroark6928
@jackroark6928 2 жыл бұрын
⭐❤
@unyimeakn9615
@unyimeakn9615 3 жыл бұрын
Can you do tutorial using redis thank you
@tyler.farmer
@tyler.farmer 3 жыл бұрын
question on the Close Price: when you look at a bar with the OHLCV, is the Close value for that minute, or the previous minute? The reason I ask: The ATR calculations use the Max [ (High-Low), (Abs(High - Previous Close)), and (Abs(Low - Previous Close)). So wondering if we should use the Close value on the same row, or use the Close value from the Previous Row?
@ThesniperScythe
@ThesniperScythe 3 жыл бұрын
Did you figure this out?
@tyler.farmer
@tyler.farmer 3 жыл бұрын
@@ThesniperScythe No, I have not.
@F12545
@F12545 3 жыл бұрын
Hello from Cuba. Try to use Order Flow
@lucksimi3320
@lucksimi3320 Жыл бұрын
Hi Can get the code for WEEKLY supertrend? thanks
@muratisler9954
@muratisler9954 3 жыл бұрын
Thank you for the nice videos, I just wanted to say that, TA doesn't have MA types selection like TA-lib, different MA types are very important for trend trackers. Supertrend looks nice but not efficient and hard to optimize because it jumps on the bands :) For the first look, the super trend seems great but when you backtest it, the results are not good enough.
@mikescarborough9196
@mikescarborough9196 Жыл бұрын
Supertrend is useful for visualizing trend reversals in terms of ATR magnitude, but it most definitely does not cut it as a standalone indicator. It’s not a bad filter though.
@Mr.Jah99
@Mr.Jah99 3 жыл бұрын
I have been using python38 and print (upper_band) it shows the powder as below. What did I do, where did I go wrong? Help me. import ccxt import ta import pandas as pd import config import schedule from ta.volatility import BollingerBands, AverageTrueRange exchange = ccxt.binance({ 'apiKey':config.BINANCE_API_KEY, 'secret':config.BINANCE_SECRET_KEY }) bars = exchange.fetch_ohlcv('ETH/USDT', limit=20) df = pd.DataFrame(bars, columns=['timestamp', 'open', 'high', 'low', 'close', 'volume']) bb_indicator = BollingerBands(df['close']) upper_band = bb_indicator.bollinger_hband() print(upper_band) ....................................................................... 0 NaN 1 NaN 2 NaN 3 NaN 4 NaN 5 NaN 6 NaN 7 NaN 8 NaN 9 NaN 10 NaN 11 NaN 12 NaN 13 NaN 14 NaN 15 NaN 16 NaN 17 NaN 18 NaN 19 2433.810588 Name: hband, dtype: float64 >>>
@jamiekenber
@jamiekenber 3 жыл бұрын
It's a pain to install TA-Lib but that's because it runs on faster native languages. Wouldn't want to be relying on Pandas to process thousands of stocks with any kind of frequency
@xuan_learning
@xuan_learning 2 жыл бұрын
I have one question that I hope someone can help me with. I think I have the identical code, but my upper_band= bb_indicator.bollinger_hband(); only return index 19 and the rest of the indexes are showing NaN. WHY?
@giratinum
@giratinum 2 жыл бұрын
increase the number of candles. BBand needs 20 candles to caculate but you give only 20 candles to it.
@mikescarborough9196
@mikescarborough9196 Жыл бұрын
If only TradingView would come out with a Python version that replaces Pine Script.
@DGDaytrading
@DGDaytrading 3 жыл бұрын
Which Program is that on 3:20 you are using?
@Invibcible
@Invibcible Жыл бұрын
visual studio
@jack_sparrow1049
@jack_sparrow1049 3 жыл бұрын
I have a question :- i have written a strategy in Pine_script ( tradingview) but i want to convert it to python. Please can you tell which libraries can help me to do that because my strategy is very complex ? there are few limitation in pine script so i want to shift to python............Hope i get reply from you😎
@jadhavpratik37
@jadhavpratik37 3 жыл бұрын
Same problem with me. Since Pinescript is the language of TV, it might be a bit difficult to find a way around it
@jack_sparrow1049
@jack_sparrow1049 3 жыл бұрын
@@jadhavpratik37 if u can understand the math of indicator or your custom formula/ indicator it is very easy to convert it to python using pandas if u don't have any custom indicator or formula then you can use " ta lib" library to make your algorithms as almost every indicator is available in that library 😀 Pine script is the best language for creating strategies if you stay with the pine script you will easily understand that
@afblaze94
@afblaze94 3 жыл бұрын
What ide are you using in this video?
@parttimelarry
@parttimelarry 3 жыл бұрын
Visual Studio Code with Python extension. I really need to make a tutorial on just this topic since the question comes up a lot and I realized I naturally use certain shortcuts to browse the libraries I install, but not everyone has this configured.
@afblaze94
@afblaze94 3 жыл бұрын
@@parttimelarry That will be a great help!
@taiwo_the_illusive
@taiwo_the_illusive 2 жыл бұрын
@@parttimelarry this would be really helpful! Would be great to know some of the plug-ins you use
@kaypbalk6027
@kaypbalk6027 2 жыл бұрын
I still got Nan error. How can I fix it?
@giratinum
@giratinum 2 жыл бұрын
increase the number of candles. BBand needs 20 candles to caculate but you give only 20 candles to it.
@kaypbalk6027
@kaypbalk6027 2 жыл бұрын
@@giratinum thank you :')
@colinmaharaj
@colinmaharaj 3 жыл бұрын
Love your content. But I prefer C++
@parttimelarry
@parttimelarry 3 жыл бұрын
Awesome. I would like to do a few tutorials on other languages. I am not as proficient with C++ since I only used it at school and not professionally though. Python is a good language for teaching I find.
@colinmaharaj
@colinmaharaj 3 жыл бұрын
@@parttimelarry Here's the weird part, because I havee so much C++ on the brain, I seem to be less inclined to do python. I have 25+ years experience in C++ and can write any kind of code you can think of.
@colinmaharaj
@colinmaharaj 3 жыл бұрын
My goal is to do analysis for about 30 stocks and once and find the best entry point for each thread/ session.
@VikasPatel-cu4ci
@VikasPatel-cu4ci 3 жыл бұрын
Can renko chart with wick help bro
Supertrend Part 2 - Basic Bands in Python
26:34
Part Time Larry
Рет қаралды 27 М.
Pandas TA Tutorial
27:00
Part Time Larry
Рет қаралды 45 М.
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 7 МЛН
🤔Какой Орган самый длинный ? #shorts
00:42
Playing hide and seek with my dog 🐶
00:25
Zach King
Рет қаралды 30 МЛН
Hacker101 - JavaScript for Hackers (Created by @STOKfredrik)
24:17
Supertrend 4 - CCXT Crypto Bot - Order Execution with Python
34:05
Part Time Larry
Рет қаралды 55 М.
Technical Stock Analysis Made Easy in Python
29:47
NeuralNine
Рет қаралды 61 М.
Supertrend 3 - Detecting Uptrends and Downtrends with Python
21:52
Part Time Larry
Рет қаралды 32 М.
25 Nooby Pandas Coding Mistakes You Should NEVER make.
11:30
Rob Mulla
Рет қаралды 263 М.
Build a TTM Squeeze Scanner in Python
53:30
Part Time Larry
Рет қаралды 34 М.
Financial Data with Python: yfinance
34:09
Data Science for Everyone
Рет қаралды 68 М.
Exploratory Data Analysis with Pandas Python
40:22
Rob Mulla
Рет қаралды 444 М.
Deep Drowsiness Detection using YOLO, Pytorch and Python
1:18:35
Nicholas Renotte
Рет қаралды 245 М.
Radico Khaitan- One Fastest Growing Company For 2022?
27:11
- А что в креме? - Это кАкАооо! #КондитерДети
00:24
Телеканал ПЯТНИЦА
Рет қаралды 7 МЛН