Technical Analysis Library in Python Tutorial

  Рет қаралды 51,366

Part Time Larry

Part Time Larry

Күн бұрын

Пікірлер: 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 Жыл бұрын
This is amazing video. Thank you very much Larry!
@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!
@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.
@alibulus4382
@alibulus4382 3 жыл бұрын
You are amazing dude.
@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!
@investvest4571
@investvest4571 3 жыл бұрын
Awesome tutorial! Easy to follow. Thank you.
@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!
@thedude3369
@thedude3369 3 жыл бұрын
Thank you for making these your videos are excellent and very informative.
@cetilly
@cetilly 3 жыл бұрын
Awesome topic and very well presented. I also prefer TA; good call
@InsertGreatChannelName
@InsertGreatChannelName 3 жыл бұрын
Nice, my man back again with Ta
@typeer
@typeer 3 жыл бұрын
back again! great as always thanks larry
@lokendrayadav91
@lokendrayadav91 3 жыл бұрын
Hey man trust me you are awesome 😎
@BenjaminBalaj-yp8zk
@BenjaminBalaj-yp8zk Жыл бұрын
A sub to you my good sir!
@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.
@somajuice666
@somajuice666 2 жыл бұрын
YES LARRY! NICE TO SEEYOU AGAIN :D
@glopessantos1
@glopessantos1 3 жыл бұрын
thanks a lot for your contribution
@kg6itc
@kg6itc Жыл бұрын
Was there a part 2 for this? This is GREAT! Thanks!
@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
@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()
@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
@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
@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.
@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
@maxxgray2539
@maxxgray2539 3 жыл бұрын
Looking forward on your next videos, are you going to use backtrader to test your strategies?
@javidhb
@javidhb 3 жыл бұрын
it was extremely useful.... tnx
@vamsikrishna8132
@vamsikrishna8132 3 жыл бұрын
when is the next video coming? eager to learn
@Invibcible
@Invibcible 2 жыл бұрын
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?
@MarcusVinicius-lq3fe
@MarcusVinicius-lq3fe 2 жыл бұрын
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.
@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.
@unyimeakn9615
@unyimeakn9615 3 жыл бұрын
if you are having issues installation ccxt on windows. Open cmd has admin.
@aryalsubsc
@aryalsubsc 7 ай бұрын
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.
@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!
@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.
@ayhanataman
@ayhanataman 2 жыл бұрын
can we use for stock ?which library can i use
@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
@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 >>>
@abdullahb4367
@abdullahb4367 3 жыл бұрын
awesome video as always. is there a way to trade based on Renko charts in this python?
@maheshguntty
@maheshguntty 3 жыл бұрын
Hello bor can u give example of SMA cross over using Pandas_ta plz
@Ligariuz
@Ligariuz 3 жыл бұрын
What lib did You recommend to plot this?, like trading view?
@xuan_learning
@xuan_learning 3 жыл бұрын
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 3 жыл бұрын
increase the number of candles. BBand needs 20 candles to caculate but you give only 20 candles to it.
@lucksimi3320
@lucksimi3320 Жыл бұрын
Hi Can get the code for WEEKLY supertrend? thanks
@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.
@DGDaytrading
@DGDaytrading 3 жыл бұрын
Which Program is that on 3:20 you are using?
@Invibcible
@Invibcible 2 жыл бұрын
visual studio
@F12545
@F12545 3 жыл бұрын
Hello from Cuba. Try to use Order Flow
@kaypbalk6027
@kaypbalk6027 3 жыл бұрын
I still got Nan error. How can I fix it?
@giratinum
@giratinum 3 жыл бұрын
increase the number of candles. BBand needs 20 candles to caculate but you give only 20 candles to it.
@kaypbalk6027
@kaypbalk6027 3 жыл бұрын
@@giratinum thank you :')
@ai.simplified..
@ai.simplified.. 3 жыл бұрын
Is it possible to automate everything for online trading like a bot?
@jackroark6928
@jackroark6928 2 жыл бұрын
⭐❤
@fivetenash
@fivetenash 3 жыл бұрын
yeeee
@unyimeakn9615
@unyimeakn9615 3 жыл бұрын
Can you do tutorial using redis thank you
@ShujaathKhan
@ShujaathKhan 3 жыл бұрын
How diff is this compared to finta or talib?
@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
@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!
@Millio_4_reallio
@Millio_4_reallio 3 жыл бұрын
@@parttimelarry this would be really helpful! Would be great to know some of the plug-ins you use
@mikescarborough9196
@mikescarborough9196 Жыл бұрын
If only TradingView would come out with a Python version that replaces Pine Script.
@VikasPatel-cu4ci
@VikasPatel-cu4ci 3 жыл бұрын
Can renko chart with wick help bro
@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.
Supertrend Part 2 - Basic Bands in Python
26:34
Part Time Larry
Рет қаралды 28 М.
Candlestick Pattern Recognition with Python and TA-Lib
24:11
Part Time Larry
Рет қаралды 116 М.
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Pandas TA Tutorial
27:00
Part Time Larry
Рет қаралды 46 М.
Predicting Stock Prices in Python
29:14
NeuralNine
Рет қаралды 541 М.
Analyze Prediction Market Data with Polymarket API (Python Tutorial)
15:26
Supertrend Part 1 - Average True Range
19:44
Part Time Larry
Рет қаралды 29 М.
Tech I'm Learning in 2023, Free Courses and Books
23:33
Part Time Larry
Рет қаралды 18 М.
Build a TTM Squeeze Scanner in Python
53:30
Part Time Larry
Рет қаралды 35 М.
Detecting Price and Volume Patterns with SQL and TimescaleDB
43:29
Part Time Larry
Рет қаралды 18 М.
Tutorial: Build a Technical Screener Webapp in 100 Lines of Code
52:52
Part Time Larry
Рет қаралды 97 М.
Interactive Brokers Web API [Part 1] - Docker Tutorial
28:54
Part Time Larry
Рет қаралды 11 М.