Unlike so many videos involving python yours actually works! Great job!
@RichardMoglen3 жыл бұрын
Thanks Glen!
@martorella123 Жыл бұрын
Richard, Thank you for this ! I recently started at a new firm where all the automated trading is done in Python. Thus far the extent of my programming experience has been with Easy Language in TradeStation and MultiCharts. These videos are extremely helpful! John
@pavansshanbhag2 жыл бұрын
I came to this video through a medium post and i must say, you have done something powerful with very few lines of code. God bless you for sharing this peice of knowledge!
@RichardMoglen2 жыл бұрын
Thanks Pavan! Could you link the medium post?
@alexblagojevic34253 жыл бұрын
Hey man. I watched one of your videos like 8 months ago and now im making a GUI for my trading system. Just wanted to say thanks and youre the man.
@RichardMoglen3 жыл бұрын
Awesome Alex! Shoot me some screenshots over on twitter I'd love to see what you've come up with
@toddroloff932 жыл бұрын
Nicely done!!! I like your logic and the way you break down the coding so rookies like myself can grasp it is great..Your passion for both programming and finance shines through..Keep up the great work..Thank you
@RichardMoglen2 жыл бұрын
I appreciate that!
@chaitanyapai15514 жыл бұрын
Building an algo trading system and this is exactly what I needed! Amazing logic man, this video deserves a lot more views. Thanks a lot and God bless you!
@RichardMoglen4 жыл бұрын
Sounds cool! best of luck
@10fersen2 жыл бұрын
How is it going?
@ml0k14 жыл бұрын
Thanks Richard. I always look forward to your videos.
@RichardMoglen4 жыл бұрын
Thanks man!
@hishamashour57714 жыл бұрын
This is by far the best explanation, I'd really like to thank you a lot for this, you've earned a subscriber. Keep up the great work man!
@RichardMoglen4 жыл бұрын
Awesome, thank you!
@efueyo3 жыл бұрын
Once again, thank you for your excellent work. For those of us who do not understand spoken English well, but if we defend ourselves quite well with written English, it would be very useful to be able to access the transcripts.
@draugh1r2192 жыл бұрын
enable the subtitles
@15nkrish4 жыл бұрын
The videos are awesome. Haven't programmed in a while - you Richard are inspiring me to go back to what I started doing out of college!!
@RichardMoglen4 жыл бұрын
Great to hear! Best of luck with it!
@benjamintreitz16473 жыл бұрын
Moglen, you are the coolest dude ever. Great series
@RichardMoglen3 жыл бұрын
Haha thanks Benkamin!
@matthewrenegar65592 жыл бұрын
If you try the reverse (currentMin, min instead of currentMax, max), it will fail due to a dates == 0 will occur and fail when timeD is added to it in the final for loop. The below code will fix that. if counter==5: if currentMin == 0: pass else: lastPivot=currentMin dateloc=Range.index(lastPivot) lastDate=dateRange[dateloc] pivots.append(lastPivot) dates.append(lastDate)
@SamiSabirIdrissi3 жыл бұрын
Dude! Super dope video ! Good job. Keep killin it!
@RichardMoglen3 жыл бұрын
Appreciate it!
@PavelSumik4 жыл бұрын
Absolutely amazing, you are a complete magician
@RichardMoglen4 жыл бұрын
Haha Thanks Pavel
@blakedavis91744 жыл бұрын
Great video Richard, this series has been super helpful!
@RichardMoglen4 жыл бұрын
Thanks Blake!
@michelemeloni30793 жыл бұрын
Thanks man, you're a genius 🤜 Please go on with other videos !!
@RichardMoglen3 жыл бұрын
Thanks, will do!
@enzanto2 жыл бұрын
Great tutorial. I created a script like this. And one for checking if they break pivot point. And reporting straight to my discord. Will run it in a container in my kubernetes cluster :D
@alokeranjan63204 жыл бұрын
Very nicely explain the code, I was searching the exact code. You are awesome. keep it up.
@RichardMoglen4 жыл бұрын
Glad I could help!
@alexwutzke74593 жыл бұрын
This is really great! Thanks for doing this!
@RichardMoglen3 жыл бұрын
Glad you enjoyed it!
@stephenrwafa25194 жыл бұрын
Thanks bud this is exactly what I needed added min logic to calculate support as well. Great stuff keep it...
@RichardMoglen4 жыл бұрын
Glad it helped!
@DuesenbergMusicGroup4 жыл бұрын
why leave a like ... I leave a love down below
@RichardMoglen4 жыл бұрын
❤️
@lucabreder27573 жыл бұрын
Thank you very much for your work! Love the content!
@RichardMoglen3 жыл бұрын
My pleasure!
@larz44374 жыл бұрын
I'm Bizcycles on Twitter. Another great tutorial my man!
@RichardMoglen4 жыл бұрын
Thanks Lee, Take care!
@brettoski4 жыл бұрын
Great video Richard, very cool
@RichardMoglen4 жыл бұрын
Thanks Brett!
@LatinoWebStudio2 жыл бұрын
Thanks so much for the video! Is there an episode to calculate a pivot point for support? Once it starts running back up? I'm thinking of using it with the email alert, one for resistance and one for support, if possible.
@skybat7234 жыл бұрын
great stuff Richard--love it---helps so much for support and resistance and we can write extra MA strategies on top---helps a lot for newcomers especially squinting their eyes to draw support/resistance.... could you please explain how to apply to 50week calculations? i see your example goes back to 1 year back...but where are you defining this... trying to map 10 days out to 50 weeks..
@PeterJavorkai_is_on_fire4 жыл бұрын
Woop woop, I really like these python sessions! 🤘
@RichardMoglen4 жыл бұрын
Thanks Peter! Glad you like them
@flydr22 жыл бұрын
Nice work... Thanks
@RichardMoglen2 жыл бұрын
No problem 👍
@GTAVaultSeries2 жыл бұрын
How can I fix the chart not popping up? I have everything you have coded in the video but the chart and the pivot points don't show. Any suggestions?
@johnbroe61164 жыл бұрын
Keep up the great work!!! Also if you don't mind could you add the code to this tutorial
@rafaelosorio22512 жыл бұрын
Hi Richard, thanks for you tutorials, are excellent. One thing please, I get error on this code, I compare mine and the screen and apparently are the same, could you share the code please?..Thanks.
@drizzle4728 Жыл бұрын
Thank you.
@SIMONONLY4 жыл бұрын
Really appreciated for the tutorials , i did learn great deal from it . Over the last 2 days , i tried to rewrite your code in diff style. Can you provide me with some comments. Especially on drawbacks. start = dt.datetime( 2019,6,1) end = dt.datetime(2020, 9,18) today = dt.datetime.today() tickers =['TSLA'] for ticker in tickers: df = web.DataReader(ticker,'yahoo', start, today) df['10dHigh']= df['High'].rolling(10).max() dfk= df[df['10dHigh'].shift(-5)==df['High']]['High'] df['High'].plot(figsize=(12,8)) dfk.plot(style= "r.", marker =1, markersize = 36)
@k2icc3 жыл бұрын
Have you ever tried Harmonic Patterns such as per youtuber "PythonParseltongue"? It was a nice series, but the guy never finished up. That could be a nice one to recreate and finish to the next step. Great videos you are making too.
@sonsam13913 жыл бұрын
Hello, can you tell me how I can trade 1-minute charts for index futures? How to judge from today's closing price whether the market's opening price will rise or fall tomorrow? thank you
@OzgurUrhan3 жыл бұрын
Thanks for video. How can we select more than one stock?
@RichardMoglen3 жыл бұрын
Thanks Ozgur, make a list of tickers and then iterate through that list
@jburns32103 жыл бұрын
Richard, thanks for the great videos. Could you recommend a python book that deals with financials for me.
@jenaman00012 жыл бұрын
Hi Richard, nice video. Thanks for it. I was trying to see if is there any way we can plot (interactive) candlestick charts instead of the line chart. Also, annotate the last price on the chart. Please guide.
@jenaman00013 жыл бұрын
Hi Richard, this a very good video and lots of things are clarified. Can we do the same thing to find the bottom of the stock price... Support levels ...then it can be a good entry point to catch the big moves.. please suggest..
@jenaman00013 жыл бұрын
Nevermind, I figured it out. One question though, I guess we will the marks for support after 5 Days correct ??
@priyanandanavarmamudunuri37874 жыл бұрын
Awesome video!!.......Could share how to add a stop loss may be at a support level and trail the SL at subsequent supports?
@sagarkapile87044 жыл бұрын
Thanks Richard for the short and simple code for Resistance. What are the modification we need to do to make it for intra-day on 5 mins candle .
@RichardMoglen4 жыл бұрын
Hi sagar, any time frame should work the same, but you would need the data for intraday
@anthonymacle18803 жыл бұрын
Hi Richard, in case we get an alert once a pivot has been busted, what happen if the prices retarces below and then bust it again. Could we find a way to get the alert again ?
@prathammehta32754 жыл бұрын
This is really helpful! Will a similar logic work for calculating the support?
@RichardMoglen4 жыл бұрын
Yes absolutely
@prathammehta32754 жыл бұрын
@@RichardMoglen Perfect! However, what would you suggest for a more ML-based approach to this?
@efueyo3 жыл бұрын
Thanks Richard. Really great. It would be nice to be able to access the full code. It is difficult to transcribe it from the video. I have done it and when executing it returns the error -------------------------------------------------- ------------------------- TypeError Traceback (most recent call last) in 29 Range = Range [1: 9] 30 Range.append (value) ---> 31 dateRange = dateRange [1: 9] 32 dateRange = dateRange.append (i) 33 TypeError: 'NoneType' object is not subscriptable What can be the cause?. Perhaps some copied sentence I have not done correctly. I am blocked.
@dancat3332 жыл бұрын
ah, I have a working set of code. I think your mistake is it should be "dateRange.append(i)" not "dateRange = dateRange.append (i)"
@yosualumbangaol78674 жыл бұрын
Hi Richard, very nice explanation. Btw, I got some error that said: "ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all()." I think this error relate to your line 29, which you use 'default = 0'. My default letter's color is also didnt change. Dou you have any ideas to solve this problem?
@oliverludwig61484 жыл бұрын
Could we adapt this code, so it works for currency pairs as well?
@RichardMoglen4 жыл бұрын
If you can find a source for the data absolutely!
@oliverludwig61484 жыл бұрын
@@RichardMoglen I could find historical currency data on yahoo finance and on dukascopy.com, which I can download as csv, which is good enough for now. My current goal would be to be able to backtest trading strategies, in particular one, which is based on resistance levels, so I'm glad, that you posted these playlist just recently. However my Python knowledge is still rather basic, and if I try myself at this advanced stuff, I sooner or later find myself in a jungle of cryptic error messages. F.e: the currency data from yahoo finance is different than stock data. df.info() gives floats for stocks, but objects for currency. Weirdly I also have code, which works in Spyder, but not Jupyter notebook.
@stephenrwafa25194 жыл бұрын
I did adapt it for forex it works great.
@martinprzybylski3 жыл бұрын
Richard, thanks for the videos, they are really great. I have a question.. how can I remove the hours, minutes and seconds when you print the pivots and dates? Thanks again!
@theshortcut1014 жыл бұрын
Would it be possible to substitute the highs for lows and find the areas of support? Thank you great video!
@RichardMoglen4 жыл бұрын
Yes absolutely! That sounds like a very interesting idea
@jenaman00013 жыл бұрын
@Richard Moglen , can you please guide or create a strategy with python for premarket breakout for high and low...I am bit struggling there with my logic.. please guide or help.. Thanks, Manoj
@slavikboi99283 жыл бұрын
Beauty vid
@lucksimi33203 жыл бұрын
Hi Can you make python programm that detects all chart patterns (with buy and sell) "head and shoulder, flag, handle and cup, etc...) thanks
@codee75753 жыл бұрын
Dont understand plt.plot_date([dates[index],dates[index]+timeD], why x ,y in a list that have two values
@beni54334 жыл бұрын
Hey Rich great work I have one question tsla msft got called green and they got crushed your thoughts thx
@RichardMoglen4 жыл бұрын
Got called green? Neither has presented a strong setup yet.
@phitaumatthew4 жыл бұрын
Hi Richard. How would one do a S/R program that would look back over say 2 years of historical data and be able to pull out S/R with Price by Volume?
@RichardMoglen4 жыл бұрын
Hi Matthew, these pivot points only take into account price. You could definitely find support levels the same way. Including volume is a bit tougher because yahoo does not have intraday volume/price data
@phitaumatthew4 жыл бұрын
@@RichardMoglen Thanks so much for the quick reply. But if you had an API that had the volume, could you pull that way? If so, how would one do that?
@thabangtsajoa7163 жыл бұрын
Very great content, question: why is your range [1:9] not [1:10]? I didn't understand that part.
@trocchiettoski3 жыл бұрын
you change the first 9, the 10 is then append, in this way you iterate instead that 1 number per time, 10 numbers at time so that you can calculate if there is a max pivot, namely a value that is bigger than the last 5 and previous 5
@thabangtsajoa7163 жыл бұрын
@@trocchiettoski thank you for your response Giovanni, I appreciate it
@trocchiettoski3 жыл бұрын
@@thabangtsajoa716 happy trading mate
@henriksvankjrsommerin82873 жыл бұрын
Hei Richard! First and foremost - thanks for your awesome content. I've looked through this video about 5-6 times to check if my code is identical to yours, but I still get stuck in an endless for loop - whereas the plot is never printed. Any idea why? I am rather new to programming and can't seem to find a solution to my problem by googleing it, so I'll give it a shot and reach out to you.
@myra28962 жыл бұрын
Just comment out the while loop. The chart should show up.
@DuesenbergMusicGroup4 жыл бұрын
Richard i'm stuck concerning comparing bull and bear gaps stats in yfinance, with the last "Adj Close" to the "Open" the following day, due to the fact that it is a time stamp that can't seem to be reset as a value column, however
@RichardMoglen4 жыл бұрын
hmm can you show me your code and explain what you are trying to do? Make sure you are accessing the stock price not the date index
@DuesenbergMusicGroup4 жыл бұрын
@@RichardMoglen I'm trying to reference u reference to the previous row of the value or Adj Close but it can't refer to it since Yfinance row reference is a time stamp for i in range(0,x): u += 1 df["line"][i] = u ival = df["Adj Close"][i] uval = df["Open"][i] if(ival
@DuesenbergMusicGroup4 жыл бұрын
as of the get I used the one from the MA50 video df=pdr.get_data_yahoo(stock,period="1d", interval="1m", prepost=True)
@mukeshmalviya47972 жыл бұрын
How to calculate number of ट्रेड And plot on chart help 🙏🙏🙏🙏in python Please syear
@dimitrihobbs13134 жыл бұрын
Do you have any suggestions for brokers I should move to? I am planning on leaving Robinhood
@RichardMoglen4 жыл бұрын
Hey Dimitri, I've only used Robinhood, Vanguard and TD Ameritrade. I've had no problems with both vanguard and TDA. Hope you''re doing well!
@sandeepsharma1484 жыл бұрын
Hi Richard, Could you please share the code i write the same code but getting error. TypeError: 'list' object is not callable
@michaelscarn73754 жыл бұрын
same shit, drives me crazy
@michaelscarn73754 жыл бұрын
got it. Rename "range" array to something different like valueRange. Turns out range is a reserved word
@sandeepsharma1484 жыл бұрын
@@michaelscarn7375 yes you were right. I resolved this issue by change to some other variable.
@blood4bones3663 жыл бұрын
Can i get the Github repo?
@marius22934 жыл бұрын
plt.plot_date([dates[index],dates[index]+timeD],[pivots[index],pivots[index]], linestyle="-", linewidth=2, marker=',') Traceback (most recent call last): File "/Users/marius/Desktop/py_ex/tsla.py", line 287, in plt.plot_date([dates[index],dates[index]+timeD],[pivots[index],pivots[index]], linestyle="-", linewidth=2, marker=',') TypeError: unsupported operand type(s) for +: 'float' and 'datetime.timedelta' What am I missing?
@gregwilli19804 жыл бұрын
Marius confirm if your pivots.append and dates.append are correct. They should be pivots.append(lastPivot) and dates.append(lastDate) I had one wrong. Once I corrected it the code worked.
@jonathanbognaski26903 жыл бұрын
Still can't get the pivots to print and spent hours trying to figure something out. Did your issues get solved?
@anthonymacle18803 жыл бұрын
@@jonathanbognaski2690 im stuck with this too. spent hours nothing any luck on your side ?
@david75594 жыл бұрын
Hey man love the video, great content! But I cant get the lines plotted, however I do get one resistance value as output, could you help me out?
@RichardMoglen4 жыл бұрын
Hi David are you getting an error?
@david75594 жыл бұрын
@@RichardMoglen No I'm not getting an error, I just can't get the resistance lines plotted when I'm on a lower timeframe than daily, for example when I try to change the timedelta according to my timeframe(1h) timeDelta(hours=4). What should I set timeDelta as at timeframes like 1h or 5m? Thanks!
@timanderson15603 жыл бұрын
I'm getting the exact same problem except I am just trying the code as is. Did you ever find a solution to this?
@timanderson15603 жыл бұрын
whoops had an indent in the wrong place. My bad. Awesome code!
@myl0rd34 жыл бұрын
Can I use this code in tradingview api?
@RichardMoglen4 жыл бұрын
You could code this into trading view I think.
@tradingenthusiast21784 жыл бұрын
Can you send a copy of the code like other videos please
@ofekdayan9670 Жыл бұрын
Can you share the code? :)
@garyketchen13 жыл бұрын
ffff
@mynas-ng5tt3 жыл бұрын
May Iknow that how to get the code for python?
@wavanstore9253 жыл бұрын
Can i use same timeframe for 15min charts as well?