In case you are interested how to build this strategy WITHOUT overlapping positions watch this: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html BTW Thanks a lot for all your comments no matter if they were positive or constructive criticism!
I appreciate your kind words but there is nothing to be amazed about. I invested some time building the strategy before recording the video and definitely had some difficulties here and there. But nevertheless I appreciate your kind words :-) Just keep on grinding, coding and always be keen to learn new stuff and with a little bit of patience you will outdistance me in no time ;-)
Great work. I would like to point out a couple of things though. 1) to avoid over-exposing yourself to a security, you should first check if we have already a position open with that security and avoid investing again. 2) this strategy live may turn out to be a losing one because this doesn't account for brokerage fees (sometimes they may be a percentage of the investment and turning some of the wins in a loss anyways). So maybe the win rate may be definitely lower than that.
Hi buddy, thanks a lot for your comment and sharing your thoughts! I addressed the first point in this video only allowing one open position at the time: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html Regarding the second point: Definitely true! Adding brokerage fees to a strategy is technically no big deal. Backtrading libraries such as backtrader are just taking a fixed amount and subtracting that from the profit. You can extend that when calculating the profits with a simple loop or list comprehension.
Really interesting video. Even more refreshing to see a content provider who actually responds to comments and engages with his followers. I'm intrigued by this but it also went 95% over my head. For example, what is this editor you're using? It looks like you're just writing this in Safari. Can you please point me to a Python intro video(s) to get me up to speed to better understand what you are doing here?
Hi Tim, thanks a lot for your comment. Happy to read! You are invited to check out my 1 Hour Python Crash course including all tools I am using and the programmatic basics you will need here: www.udemy.com/course/python-programming-fundamentals-in-one-hour/learn/quiz/5570936?referralCode=3E7C3A477A10A7933AA6 For a free option (but less structured probably) you can check out both the Python Introduction playlist and the Python for Finance. Cheers!
Regarding the df.ewm().mean() function, you can also specify directly the Smoothing factor as an argument : def RSI(ticker, period=10): df['avg Up1'] = df['Upmove'].ewm(alpha=1/period).mean() That way, you don't have to do the conversion each time you want to modify the RSI' time period
@@Skandawin78 actually period of 10 when the simplification is done, which is what he intended for as WSM isn’t a function in Python. So he used ewm() with span of 19 to make the denominator sums up to 20, to reach 10 when 2/20 takes place.
Love your channel for python coding. Essentially this is just a positive momentum strategy with a take profits built into it. As you show in 3m chart there are no signals when stock trends down in price. Momentum is fine to trade but you need to avoid crashes, the sell signal via short term rsi does this here but also misses out on profits from a buy hold strategy when the stock moves higher over a long period. Unfortunately a pure price based strategy will never work all the time, this is a great start though.
Thanks for watching. I appreciate your comment :-) Nevertheless I wouldn't consider myself an algo trader. At least as long as my salary is above my (average) trading profits :-D
Great video! This one is cleaner and also with more tickers we'll get more signals. I think I have to tweak this code a little bit to get the each ticker names and last date of signal trigger to run it daily for new signals. And also I think we have to have a code which checks every day if the selling condition is fulfilled for the trades we took to make it autonomous. Anyway great video. Looks very promising. Keep up the good works!
Thanks for watching! It seems like you can read my mind :-P The next step would be similar to what you have described. A deployment for a notifier or maybe even a (very simplified) API would be very nice or what do you think? I will work on something like that in the near future, but still have some more topics I want to cover before. Cheers and thanks for your input. I really appreciate it!
Subscribed! Absolutely great video! I love the detailed explanation in every step. That is very helpful for me as Python beginner. It is interesting to see you calculating everything "by hand" but what do you think about using libraries like TA-lib or backtrader which make some parts easier? (Actually I came accross your video by looking for backtrader tutorials.)
Hey mate, thank you so much for watching, your kind words and subscribing. Appreciate it! My point in calculating it by hand is to teach programming stuff like that. It is the same concept as teaching ML algorithms from scratch even though there are powerful libraries: It is nice to know what's going on in the background. I have used a library in my stock recommender video in case you are interested: th-cam.com/video/AuZmsv6dQCM/w-d-xo.html I plan to make a backtrader tutorial. Can't promise anything but at least it is on my list!
About the alpha of the moving average: The number of periods (N) should actually be 4.5. Rounded to 4 or 5, at your preference. Rationale: let W(ilders) be the number of periods to calculate. 2/(N+1) = 1/(W+1) 2W + 2 = N + 1 2W = N - 1 W = (N - 1) / 2 given N = 10 then W = (10-1)/2 W = 9/2 = 4.5 great job 'pythonizing' the rules of the system! JB
the rule of thumb for finding the number of periods for an RSI calculated with an exponential MA is dividing the number of periods by 2 and add 1. the corresponding RSI of an EMA of 200 periods would be an RSI of 100+1= 101. better to round it to 100... the corresponding RSI for an EMA of 50 periods would be 25 and so on and so forth ;) JB
@@Algovibes I'm sorry for the huge amount of time to answer you. I didn't notice your reply. I went back and check the video. The alpha wilder uses is 1/N and not 1/(N+ 1). My bad. :( correcting the equation: Rationale: let W(ilders) be the number of periods to calculate. 2/(N+1) = 1/W 2W = N + 1 W = (N + 1) / 2 so the RSI periods corresponding to a 10 periods EMA would need to be (10+1)/2 = 5.5 rounded to 5 or 6 at your discretion. JB
Thanks a lot for watching and your comment. I will cover live trading in the near future (somewhen between May and July). Anyhow there are some adjustments to be made before that to this specific strategy. This video is just a technical implementation of backtesting the strategy presented by Rayner Teo (or Larry Connors) on a single stock base.
@@Algovibes Cool programming but actually why not give us average profit? Cuz looking at the histogram with 3000+ hits at 0.0001 or some bullshit it looks like we just playing even based on the histogram lol. Win rate doesnt mean shit if our avg +win is way lower then avg -lose.
Hi Algovibes, first I love your videos and I am kind of watching them non-stop as I also currently build an trading bot for fun. Second: What are your thoughts on the python TA library and their calculation on the RSI (they have actually two and am currently try to figure out the difference)? Third: How comes that you normally do not use Decimals in your videos? Again I am kind of a beginner in python and I just learned if I have to deal with prices (which are decimal values) I should also make my calculations in decimal instead of float. But maybe I misunderstood the whole topic. So if you have some comment on it let me know. Ansonsten, mach einfach weiter diese Videos. Die einfach nur super :).
Thanks a lot man :-) / Danke dir! Second question: You mean stoch RSI and RSI? Third: Would need some elaboration on that. Until now I didn't run into a problem with float values. I know there are cases which are problematic but I can't imagine a scenario where a float value would crush any trading strategy / risk measurement / ....
The only potential "pitfall" to this strategy, if I can call it that, is that the strategy can become highly levered if multiple BUY entries are entered on consecutive days for a particular stock - potentially increasing levered to 10x if BUY conditions occur day after day...Would be good to see how we can limit it to have only one order open at any time.
Absolutely agreed! I don't check for open positions in this strategy. When going live with it, one definitely should and also apply a risk reducing mechanism.
thats an amazing job! could you please provide a 'real life' example of backtesting, for example how much profit would this strategy provide out of 100$? I'd like to see if my calculations are fine ;)
I like all your videos.. very nice content.. can also make a vide on back testing intraday breakout strategy where we have to do the calculation day wise since it changes everyday in the dataframe
Thank you very much for this video. Can you please share the code in your videos? And can you write a trading bot for this strategy? I just wanted to see how you build the bot if you check for over 500 assets.
You are really amazing brother i also used to do all this with python too but i always did it with long method,you actually taught how to convert your strategy to code, hats off to u, liked and subscribed ,keep up the good work
I am just concerned about the fact that 10 Period RSI is always different than 10 days Candle RSI! I feel there is no correlation between Periods of RSI and Days. Periods just stretches the Threshold and smoothens or Inflate the trend. However a Timeframe of 10 days is the movement with the periods separated by 10 days.
Thank you mate :-) Yes there will be more trading strategies! Until then be kindly invited to check out the other ones on this channel. Best regards and I am happy to have you on board.
Hello sir,I'm new about Algo. Please teach me step-by-step how to put in at live trading and trade by bots. Using this strategy. Can test this by demo account ?
Hi mate, I have a ton of resources both free and also more deep diving paid resources. Check out the Info page here where you will find all necessary links. Let me know if you don't find something you are looking for!
The only problem with this is that the s&p index is not fixed, companies can become listed or delisted. This strategy only tests on those companies that succeeded. Think back to Enron. You would need a s&p list with historical constituents and their delist dates to have a more accurate back test. Just my 2 cents. Great video though.
Hey Scott, thanks a lot for your comment. Yes, that's called a survivorship bias. That's definitely a disadvantage of picking index components like I did but the only free way to get a stock universe.
It would've been nice idea for the future to take an integral of this last graph to see if it really is profitable, because right now you cannot see if it is profitable or not. What i mean is maybe the graph on the left side of 0 has higher total area than the one one the right of 0, and then the strategy would perform quite badly.
Hi mate, thanks a lot for your comment and your suggestion! I am getting more into details about metrics in this video: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Would love to have a built-in sensitivity analysis for RSI pairs. Like in this case you use 40 as entry/exit pairs and it spits out 70% winning rates. But I'm interested in other pairs - says
@@Algovibes Thanks. Your instructions on the video are very clear. I used to backtest all of this with Excel and just moved to Python recently so I understand the concept but not the code until I saw your video so thank a lot.
In the future, can you show us how to see the performance of any given amount of money put into any of these stocks? That way we can see how much money you could theoretically have made if invested in a certain stock with a certain amount of money. Thank you
Hey Marco, be invited to explore the videos on my channel - in specific the Python for Finance and cryptobot playlist. I have covered that in many of my videos. Let me know if you don't find anything!
@@Algovibes thank you so much. I really appreciate. I will definitely check them out. I know that I along with many others appreciate the knowledge and time u share with us. Keep doing what you are doing.
Thanks a lot and i have subscribed. While ı have been coding ı have faced with this error: "cannot set a frame with no defined index and a scalar" Do you have any suggestions?
Please make a video on python customizable Dash board for FNO traders with price alert trigger & scanner. How to build trading app using a data feed API.
Hi mate, thanks for watching and thanks a lot for your suggestion! I am planning on something similar in the upcoming months. Hope I can meet your expectation with that.
At 28:00 you calculate the profits on 3M. The array shows a bunch of 0.0xxxx numbers. I don't understand how that correlates with profits. For example, the first item in the array, 0.01841858, is that a percentage profit where you need to move the decimal place (i.e. 1.84% profit)? Also, right after that at 29:13, you calculate a winning rate of 0.837837%. That mean 83% of the trades on 3M were profitable, not that you made a 80% return on 3M, right? As I understand the strategy, you're opening the trade when RSI hits 30 and closing it at the earlier of when RSI hits 40 or 10 days later, whatever comes first. Unless I missed it, I didn't see anywhere you placed a stop-loss. So I believe there is no limit on the loss on the trades closed 10 days later because they never hit 40 RSI? If so, what kind of actual profit does the strategy generate? Because if I close 8 out of 10 trades profitably at an average profit of $10/trade but close 2 out 10 for a loss of $100/trade, that strategy would still loose money despite winning 80% of its trades.
Hi Tim, first question: yes, exactly. Second one: Also, exactly! Didn't place a stop loss at all here, that's right. I am playing a bit around with stop losses e.g. here: th-cam.com/video/4MnNft7Squk/w-d-xo.html or other videos in the Python for finance / cryptobot playlist. Be invited to explore my stuff - I have tons of content!
@@Algovibes I'll definitely check out your other videos. I hope you're making a ton off adverts. You deserve it for putting quality content out there that isn't just click-bate. One question about this strategy, do you know it's PROFITABILITY return? Not percentage of winning trades but actual return on investment. I'm just curious because it's mathematically possible to win on 83% of trades while still loosing money overall if the size of the losses, on average, is double the size of the wins. Most strategies I've seen try something along the lines of shooting for 2:1 win amount:-to-loss amount. Meaning, they're usually placing a stoploss around 1/2 the amount of their take-profit to only risk half of what they hope to gain. I'm curious what the effect is of having neither a fixed takeprofit or stoploss has on the size of the wins and losses. But, hey, impressive winning rate regardless.
Thank you! :-) There is no "THIS algorithm" (would be awesome if there would be, right? 😁) Be invited to check out the cryptobot playlist. I am playing around with a lot of strategies ranging from momentum, reversal to technical indicators.
The issue with this method is that buy signals appear in pairs (day after day), and in reality if you buy a ticker, you cannot buy it again the next day, before you sell the older lot. Some buy signals appear as 5 in a row for the same ticker. You would run out of cash if you buy and buy and buy without selling first
Not using both of them but the suggestion to connect a trading signal to another application if that's an app or a mail or whatsoever is actually quite nice. Thank you very much for sharing your idea :-)
Thanks you for your work . I have a question, if close price > ma200 and rsi < 3 for 3 consecutive days then there will be 3 consecutive buy signals right?
Thanks a lot for your comment. In this one I didn't cancel out overlaying positions. I actually covered taking only one position at a time here: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html Let me know what you think!
Curious what the magnitude of losses are? For example if you looped through all your wins/losses and did profit = 1; profit*=current_profit, do you still end up losing despite 70%+ win rate?
Good question. The notebook is somewhere on my other laptop. I covered cumulative profits in other vids. BTW this might also be interesting for you covering some more measurements: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html Let me know what you think below that!
Very cool video, thanks for sharing - quick question: How would you edit this into a buy only strategy without any automatic selling & view the cumulative return up until the last datapoint?
Thanks for watching buddy :-) You could apply a similar logic as the one in my most recent video. But you somehow need an exit in my opinion. Video: th-cam.com/video/vWVZxiaaTCs/w-d-xo.html
Hi algovibe. Thanks a lot for the video. The histogram shows a slightly positive mode, so the higher probability of winning; However, the total areas above and below zero are about the same. Does that mean the total wining and losing in terms of dollar amount is about the same?
Hi buddy, thanks for watching. Can you please give me a timestamp? In general see the analysis with caution as I don't exclude overlaying trades here. I made the necessary amendments in this video here: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html Be kindly invited to check that out.
Thank you for this interesting introduction. Trying to reproduce it I'm surprised to have different values in Adj Close column, and this leads to really a lot of trades for those 503 assets (800k since 2011) and a winning rate of 56%. Any idea why Adj Close column has been adjusted several years after quotations?
Welcome mate. depends on whether there were dividend actions, stock splits or other capital actions. BTW please check out this video here: I was getting rid of overlapping trades etc.: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Can u make a rsi strategy bot for crypto, were it buys at 40 sell at 70 atomatic??, or is there one you already made but i am to new to this channel so thats why i am asking??
I will see that I cover something like that but in my experience this strategy isn't working out. You will need to combine RSI with other indicators for better trading decisions. Anyhow thank you very much for your suggestion :-)
Honestly the python code is pretty bad. Sorry to say that to the author. I do not mean to insult him, but rather I encourage to discover about code smells in python. There are hadfull of those. In reality, had this code been structured properly, it would have been much easier to explain to the audience.
Great video, excellent programming skills! So, in this strategy there is no stop loss, always wait for when it is above of RSI 40? Anyways, thanks for the effort and sharing!
Thank you very much for your comment! Really appreciate it :-) There is indeed no Stop Loss. It could and should be considered when implementing it with real money. Just to add: The alternative exit (if RSI condition is not happening) is after 10 trading days.
Thanks for watching mate. Are you referring to the Backtrader python library? If yes, I already took a look at that and will release some stuff on it in probably the near future.
Funnily I see that comment in my notifications but not in the comment section... Thanks a lot for your input, will have a look at that in the course of the weekend.
Bro, you’re always on the awesome side of the fence :) But let me complain about few things :) the loop threw errors for BK_B and BKR_B as “no data”. Since in the year of 2022 the other stock (VICI? idk) isn’t listed no longer as SP500 firm, I didn’t bother that. But, along with the WRK, I also excluded those 2 “BK"s. But this time the empty lists of matrixsignals and matrixprofits appended only 125 of the calculated buys and profits. I receive a value error “ValueError: cannot set a frame with no defined index and a scalar” for the rest of the data. Please advice how to fix that list error. Thanks my friend. ps: I’d say god bless, but I know you’re an atheist, so I say may the cosmos be with you :))
Hi Nice tutorial, Thank you for showing us how to do it, I am new to python and pandas, I am getting the below error and i know the stock is not listed more than a year ago so the data is not full for that. how to avoid it ValueError Traceback (most recent call last) in () 3 4 for i in range(len(tickers)): ----> 5 frame = RSIcalc(tickers[i]) 6 buy,sell = getSignals(frame) 7 matrixsignals.append(buy) 2 frames /usr/local/lib/python3.7/dist-packages/pandas/core/indexing.py in _setitem_with_indexer(self, indexer, value) 1587 if not is_list_like_indexer(value): 1588 raise ValueError( -> 1589 "cannot set a frame with no " 1590 "defined index and a scalar" 1591 ) ValueError: cannot set a frame with no defined index and a scalar
Sorry for my late reply mate. This comment just popped up...lol. You need to exclude the empty ones. I have done that in my newer version here: th-cam.com/video/eEqp-iu8eI8/w-d-xo.html
You could just map the symbols to the returns. I have shown how you can do that with e.g. a DataFrame and a zip function here: th-cam.com/video/YFRJ_9RVrz4/w-d-xo.html
Well that is a at least in my perception a very general question. In general you should see technical indicators not as a reliable thing to predict next moves but rather see them as an orientation and combine them with other indicators. I tested a set of technicals in this video and considered cryptos in the very end: th-cam.com/video/r8pU-8l1KPU/w-d-xo.html
Hi, could anyone please explain to me why at 33:00 we do range(len(df)-11) ? The minus 11 part is really confusing. Any help is greatly appreciated. Thanks
Thanks for your comment mate, well ad hoc you could check if there is a signal in any of the last rows by just checking if you are getting a 'Yes' value for any of those assets. The interesting thing would be getting notified once you are getting a signal. I will release a video on that in the upcoming months. I think that could be pretty interesting.
Hello ! I have parse data with my python file and getting the result in python console, now I want to export this data to google sheet. Can you help me to do that ?
@@Algovibes Thanks for the response! I found the solution by just copying it and pasting into excel by applying "data to table formula". However, I would be thankful to you, if you guide me with the code for exporting the data directly into excel. Pls give me your Discord ID if possible.
Thanks for the great tutorial! I have a question: There are many different methods to set buy or selling points. But how would you use your budget? Would you spend it all directly on the first signal or split it? for example, you have a buy signal every week, but you have no money because your money is still in circulation. Is there any strategy how to use the budget to generate the biggest profit? I am in the process of testing a few strategies that I have put together myself, but I do not have a clear result yet.
Thanks for watching and your comment! This is a great and very interesting question indeed :-) Budgeting would be an additional constraint, that's totally right! But I would need to have to dive deeper to give you a reliable answer to that. Without quantitative justification ad hoc I would say you need a budget over a certain time. This budget should be flexible meaning we have a part invested and a cash pool (which could be directly connected with capital gains/losses OR a fixed untouchable budget). Designing this strategy would be an awesome project! Also it would be interesting to see if a fixed or flexible cash pool would be more efficient. Never thought about that, thanks a lot for your input.
@@Algovibes Thanks for your answer! :) I have found very little useful literature on this topic and I am trying a few ideas myself. If something useful comes out, I will inform you ;)
Currently not, but probably in the future. I am currently spending my spare time to produce content and want to focus on that at least within this year.
Hi and thanks a lot for watching. Interesting question mate. Give it a shot and test it. Cryptotickers are e.g. 'BTC-USD', 'ETH-USD'. Let me know your results!If you need any support just let me know. I will run the machine again then :-P BTW I have some content on cryptocurrency analysis with Python on my channel. Be kindly invited to check that out.
Thanks mate. I will try it out and share the results with you. I have zero coding knowledge but watching your video is making it seems easier. Thanks for the knowledge.
@@BICARAKRYPTO go search part time larry. He built one and he admitted that it is not profitable based on RSI only. Although, the strategy is a bit different from what it describes above.
@@Algovibes I don't know if I should get "supporter" or "discord server access". I'll be a supporter if it doesn't matter. If other codes are shared on your Discord server, I can choose it. I'm also building my own bot. Maybe you would like to join. Or you can teach us how to build bots.
Thanks for sharing buddy. Please check out the updated version avoiding multiple positions and be invited to test it again on nifty: th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Hi, as a true beginner with Python programming I found your video very interesting; through this script mod could you analize and screen say 10-20 assets which returned the best profit with the lowest number of trades in a give timeframe *say 12 months? Where could I get this script to c&p in Python3? Is there a repository of your scripts?
Sure I am very happy to help. Where exactly do you get an empty list? Can you give me a time stamp? Did you follow the steps or did you deviate somewhere?
Using lambda functions inside a pandas dataframe is super slow. Save some time with the RSI calculations with import pandas_ta as ta. df['RSI'] = df.ta.rsi(10)
Awesome observation and I was considering that as well when recording this video but decided to keep it simple enough. When programming a trading algorithm it might be better to only go into a position which isn't already bought. Implementing that is not that of a big deal so let me know if you need any support doing that!
I tested it the other way, where it only buys if not in a position, and it had a 60% winning rate, so maybe buying even when already in the position is a good thing.
@@Algovibes I am not sure how to implement it. My idea was that the exit condition must be fulfilled before entering a new position but I dont know how to code it. Thanks for your videos. They are great!
In case you are interested how to build this strategy WITHOUT overlapping positions watch this:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
BTW Thanks a lot for all your comments no matter if they were positive or constructive criticism!
Thank you for a non-clickbait honest video. Straightforward and well explained.
Thanks a lot for watching! :-) Well the thumbnail is catchy tho :D
mostly IM just amazed how you can whip up your own backtest within minutes! What a display of mastery over the language, so much to learn! Thanks
I appreciate your kind words but there is nothing to be amazed about. I invested some time building the strategy before recording the video and definitely had some difficulties here and there.
But nevertheless I appreciate your kind words :-) Just keep on grinding, coding and always be keen to learn new stuff and with a little bit of patience you will outdistance me in no time ;-)
Thank you for this turorial! Exactly what I was looking, every other tutorial was focused on just one stock.
Awesome :) Thanks a lot for watching!
my complements for an excellent presentation. It is useful for both python and finance learners. Well done
Thank you very much for watching and your kind comment. Happy to hear it is useful :-)
Great work. I would like to point out a couple of things though.
1) to avoid over-exposing yourself to a security, you should first check if we have already a position open with that security and avoid investing again.
2) this strategy live may turn out to be a losing one because this doesn't account for brokerage fees (sometimes they may be a percentage of the investment and turning some of the wins in a loss anyways). So maybe the win rate may be definitely lower than that.
Hi buddy, thanks a lot for your comment and sharing your thoughts!
I addressed the first point in this video only allowing one open position at the time:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Regarding the second point: Definitely true!
Adding brokerage fees to a strategy is technically no big deal.
Backtrading libraries such as backtrader are just taking a fixed amount and subtracting that from the profit.
You can extend that when calculating the profits with a simple loop or list comprehension.
Really interesting video. Even more refreshing to see a content provider who actually responds to comments and engages with his followers.
I'm intrigued by this but it also went 95% over my head. For example, what is this editor you're using? It looks like you're just writing this in Safari. Can you please point me to a Python intro video(s) to get me up to speed to better understand what you are doing here?
Hi Tim,
thanks a lot for your comment. Happy to read!
You are invited to check out my 1 Hour Python Crash course including all tools I am using and the programmatic basics you will need here:
www.udemy.com/course/python-programming-fundamentals-in-one-hour/learn/quiz/5570936?referralCode=3E7C3A477A10A7933AA6
For a free option (but less structured probably) you can check out both the Python Introduction playlist and the Python for Finance.
Cheers!
Regarding the df.ewm().mean() function, you can also specify directly the Smoothing factor as an argument :
def RSI(ticker, period=10):
df['avg Up1'] = df['Upmove'].ewm(alpha=1/period).mean()
That way, you don't have to do the conversion each time you want to modify the RSI' time period
Very good idea! Thanks for sharing :-)
@@Algovibes Your welcome, great video as always by the way ! :)
Exactly what I was looking for. I assume the code in this video is for 19 period RSI right?
@@Skandawin78 actually period of 10 when the simplification is done, which is what he intended for as WSM isn’t a function in Python. So he used ewm() with span of 19 to make the denominator sums up to 20, to reach 10 when 2/20 takes place.
Top Content!
Love your channel for python coding. Essentially this is just a positive momentum strategy with a take profits built into it. As you show in 3m chart there are no signals when stock trends down in price. Momentum is fine to trade but you need to avoid crashes, the sell signal via short term rsi does this here but also misses out on profits from a buy hold strategy when the stock moves higher over a long period. Unfortunately a pure price based strategy will never work all the time, this is a great start though.
Thanks a lot David. Very good point! Be invited to check out my other stuff :-)
Excellent Videos.. I have created my Ichimoku buy/sell program based on your videos. Thank you so much.
Thanks mate. And..? Does it work in your desire? :D
@@Algovibes yes , I do less manual scanning of charts .. thanks 🙏
Always happy to like a fellow python algo trader !
Thanks for watching. I appreciate your comment :-) Nevertheless I wouldn't consider myself an algo trader. At least as long as my salary is above my (average) trading profits :-D
@@Algovibes haha funny way to put it. Actually I use python mostly for research. No automated trading for me, however I aim to be systematic
Great video! This one is cleaner and also with more tickers we'll get more signals. I think I have to tweak this code a little bit to get the each ticker names and last date of signal trigger to run it daily for new signals. And also I think we have to have a code which checks every day if the selling condition is fulfilled for the trades we took to make it autonomous. Anyway great video. Looks very promising. Keep up the good works!
Thanks for watching! It seems like you can read my mind :-P The next step would be similar to what you have described. A deployment for a notifier or maybe even a (very simplified) API would be very nice or what do you think? I will work on something like that in the near future, but still have some more topics I want to cover before.
Cheers and thanks for your input. I really appreciate it!
Subscribed! Absolutely great video! I love the detailed explanation in every step. That is very helpful for me as Python beginner. It is interesting to see you calculating everything "by hand" but what do you think about using libraries like TA-lib or backtrader which make some parts easier?
(Actually I came accross your video by looking for backtrader tutorials.)
Hey mate, thank you so much for watching, your kind words and subscribing. Appreciate it! My point in calculating it by hand is to teach programming stuff like that. It is the same concept as teaching ML algorithms from scratch even though there are powerful libraries:
It is nice to know what's going on in the background.
I have used a library in my stock recommender video in case you are interested: th-cam.com/video/AuZmsv6dQCM/w-d-xo.html
I plan to make a backtrader tutorial. Can't promise anything but at least it is on my list!
You are doing a very good ! keep making content on Stocks and Crypto
Thank you very much for your feedback. Really appreciate it :-) There will be more on both topics!
About the alpha of the moving average:
The number of periods (N) should actually be 4.5. Rounded to 4 or 5, at your preference.
Rationale: let W(ilders) be the number of periods to calculate.
2/(N+1) = 1/(W+1)
2W + 2 = N + 1
2W = N - 1
W = (N - 1) / 2
given N = 10 then W = (10-1)/2
W = 9/2 = 4.5
great job 'pythonizing' the rules of the system!
JB
the rule of thumb for finding the number of periods for an RSI calculated with an exponential MA is dividing the number of periods by 2 and add 1.
the corresponding RSI of an EMA of 200 periods would be an RSI of 100+1= 101.
better to round it to 100...
the corresponding RSI for an EMA of 50 periods would be 25 and so on and so forth ;)
JB
Hi mate, really appreciate your comment!
Could you elaborate on 1/(W+1) ? Wanna make sure we are on the same page.
Thanks in advance!
@@Algovibes I'm sorry for the huge amount of time to answer you.
I didn't notice your reply.
I went back and check the video.
The alpha wilder uses is 1/N and not 1/(N+ 1). My bad. :(
correcting the equation:
Rationale: let W(ilders) be the number of periods to calculate.
2/(N+1) = 1/W
2W = N + 1
W = (N + 1) / 2
so the RSI periods corresponding to a 10 periods EMA would need to be
(10+1)/2 = 5.5 rounded to 5 or 6 at your discretion.
JB
Thanks a million for your invaluable content... it's just wonderful
Thank you ☺️
You may want to check out this one as well. I fixed the code for only one open position at once:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Pretty interesting to see implamantation od such stategy in real trading, for example, using IB TWS
Thanks a lot for watching and your comment. I will cover live trading in the near future (somewhen between May and July). Anyhow there are some adjustments to be made before that to this specific strategy.
This video is just a technical implementation of backtesting the strategy presented by Rayner Teo (or Larry Connors) on a single stock base.
@@Algovibes Cool programming but actually why not give us average profit? Cuz looking at the histogram with 3000+ hits at 0.0001 or some bullshit it looks like we just playing even based on the histogram lol. Win rate doesnt mean shit if our avg +win is way lower then avg -lose.
Hi Algovibes, first I love your videos and I am kind of watching them non-stop as I also currently build an trading bot for fun.
Second: What are your thoughts on the python TA library and their calculation on the RSI (they have actually two and am currently try to figure out the difference)?
Third: How comes that you normally do not use Decimals in your videos? Again I am kind of a beginner in python and I just learned if I have to deal with prices (which are decimal values) I should also make my calculations in decimal instead of float. But maybe I misunderstood the whole topic. So if you have some comment on it let me know.
Ansonsten, mach einfach weiter diese Videos. Die einfach nur super :).
Thanks a lot man :-) / Danke dir!
Second question: You mean stoch RSI and RSI?
Third: Would need some elaboration on that. Until now I didn't run into a problem with float values. I know there are cases which are problematic but I can't imagine a scenario where a float value would crush any trading strategy / risk measurement / ....
Awesome video!
Would be even better if you put the accumulation of equity value to see how's the investment growing over time.
The only potential "pitfall" to this strategy, if I can call it that, is that the strategy can become highly levered if multiple BUY entries are entered on consecutive days for a particular stock - potentially increasing levered to 10x if BUY conditions occur day after day...Would be good to see how we can limit it to have only one order open at any time.
Absolutely agreed! I don't check for open positions in this strategy. When going live with it, one definitely should and also apply a risk reducing mechanism.
thats an amazing job! could you please provide a 'real life' example of backtesting, for example how much profit would this strategy provide out of 100$? I'd like to see if my calculations are fine ;)
Thank you very much for watching and your comment. I will see what I can do :-)
Are you sure you want to see? Because if you see it, the illusion finishes
I like all your videos.. very nice content.. can also make a vide on back testing intraday breakout strategy where we have to do the calculation day wise since it changes everyday in the dataframe
Thank you man :-)
Regarding intraday trading, you could check out my cryptobot videos - maybe you will find something useful there.
@@Algovibes I need it for backtesting.
could you please share the link if possible
great video! thanks so much!
Welcome buddy. Thanks for watching :-)
Thank you very much for this video. Can you please share the code in your videos?
And can you write a trading bot for this strategy? I just wanted to see how you build the bot if you check for over 500 assets.
Welcome man! Trading bot is actually a quite nice idea. Thanks for the suggestion!
You are really amazing brother i also used to do all this with python too but i always did it with long method,you actually taught how to convert your strategy to code, hats off to u, liked and subscribed ,keep up the good work
Thank you so much! :-) Really appreciate your comment.
I am just concerned about the fact that 10 Period RSI is always different than 10 days Candle RSI! I feel there is no correlation between Periods of RSI and Days. Periods just stretches the Threshold and smoothens or Inflate the trend. However a Timeframe of 10 days is the movement with the periods separated by 10 days.
Thanks buddy for sharing this
Hope you do lore like these
Thank you mate :-) Yes there will be more trading strategies!
Until then be kindly invited to check out the other ones on this channel.
Best regards and I am happy to have you on board.
Hello sir,I'm new about Algo. Please teach me step-by-step how to put in at live trading and trade by bots. Using this strategy. Can test this by demo account ?
Hi mate,
I have a ton of resources both free and also more deep diving paid resources. Check out the Info page here where you will find all necessary links. Let me know if you don't find something you are looking for!
The only problem with this is that the s&p index is not fixed, companies can become listed or delisted. This strategy only tests on those companies that succeeded. Think back to Enron. You would need a s&p list with historical constituents and their delist dates to have a more accurate back test. Just my 2 cents. Great video though.
Hey Scott,
thanks a lot for your comment. Yes, that's called a survivorship bias. That's definitely a disadvantage of picking index components like I did but the only free way to get a stock universe.
You must be a millionaire implementing these programs 🤑
lol :D
It would've been nice idea for the future to take an integral of this last graph to see if it really is profitable, because right now you cannot see if it is profitable or not. What i mean is maybe the graph on the left side of 0 has higher total area than the one one the right of 0, and then the strategy would perform quite badly.
Hi mate, thanks a lot for your comment and your suggestion! I am getting more into details about metrics in this video:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Would love to have a built-in sensitivity analysis for RSI pairs. Like in this case you use 40 as entry/exit pairs and it spits out 70% winning rates. But I'm interested in other pairs - says
Awesome suggestion! I actually did this on SMA pairs already. Maybe you can extract value out of that:
th-cam.com/video/vWVZxiaaTCs/w-d-xo.html
@@Algovibes Thanks. Your instructions on the video are very clear. I used to backtest all of this with Excel and just moved to Python recently so I understand the concept but not the code until I saw your video so thank a lot.
@@haovan1674 Awesome. I have a lot of other stuff on that topic. Be kindly invited to check that out and let me know what you think :-)
In the future, can you show us how to see the performance of any given amount of money put into any of these stocks? That way we can see how much money you could theoretically have made if invested in a certain stock with a certain amount of money. Thank you
Hey Marco, be invited to explore the videos on my channel - in specific the Python for Finance and cryptobot playlist.
I have covered that in many of my videos. Let me know if you don't find anything!
@@Algovibes thank you so much. I really appreciate. I will definitely check them out. I know that I along with many others appreciate the knowledge and time u share with us. Keep doing what you are doing.
Thanks a lot and i have subscribed. While ı have been coding ı have faced with this error:
"cannot set a frame with no defined index and a scalar"
Do you have any suggestions?
Can you provide me a timestamp in the video when you are getting the error? Did you deviate from my code in some way?
BTW thx a lot for subscribing mate :-)
Please make a video on python customizable Dash board for FNO traders with price alert trigger & scanner.
How to build trading app using a data feed API.
Hi mate, thanks for watching and thanks a lot for your suggestion!
I am planning on something similar in the upcoming months. Hope I can meet your expectation with that.
At 28:00 you calculate the profits on 3M. The array shows a bunch of 0.0xxxx numbers. I don't understand how that correlates with profits. For example, the first item in the array, 0.01841858, is that a percentage profit where you need to move the decimal place (i.e. 1.84% profit)?
Also, right after that at 29:13, you calculate a winning rate of 0.837837%. That mean 83% of the trades on 3M were profitable, not that you made a 80% return on 3M, right?
As I understand the strategy, you're opening the trade when RSI hits 30 and closing it at the earlier of when RSI hits 40 or 10 days later, whatever comes first. Unless I missed it, I didn't see anywhere you placed a stop-loss. So I believe there is no limit on the loss on the trades closed 10 days later because they never hit 40 RSI? If so, what kind of actual profit does the strategy generate? Because if I close 8 out of 10 trades profitably at an average profit of $10/trade but close 2 out 10 for a loss of $100/trade, that strategy would still loose money despite winning 80% of its trades.
Hi Tim,
first question: yes, exactly.
Second one: Also, exactly!
Didn't place a stop loss at all here, that's right.
I am playing a bit around with stop losses e.g. here:
th-cam.com/video/4MnNft7Squk/w-d-xo.html
or other videos in the Python for finance / cryptobot playlist. Be invited to explore my stuff - I have tons of content!
@@Algovibes I'll definitely check out your other videos. I hope you're making a ton off adverts. You deserve it for putting quality content out there that isn't just click-bate.
One question about this strategy, do you know it's PROFITABILITY return? Not percentage of winning trades but actual return on investment.
I'm just curious because it's mathematically possible to win on 83% of trades while still loosing money overall if the size of the losses, on average, is double the size of the wins. Most strategies I've seen try something along the lines of shooting for 2:1 win amount:-to-loss amount. Meaning, they're usually placing a stoploss around 1/2 the amount of their take-profit to only risk half of what they hope to gain. I'm curious what the effect is of having neither a fixed takeprofit or stoploss has on the size of the wins and losses.
But, hey, impressive winning rate regardless.
Sehr interessant ! Cooles video
Danke mein Lieber
great video, but the excellent back-test results are partly due to survivorship bias.
Thanks mate. Yes! You are right. Good point.
Just found your amazing channel...
I was wondering what is your favorite strategy for alog trading....
And which algorithm do you use your self for making trades?
Thank you! :-)
There is no "THIS algorithm" (would be awesome if there would be, right? 😁)
Be invited to check out the cryptobot playlist. I am playing around with a lot of strategies ranging from momentum, reversal to technical indicators.
again perfect
Thanks mate
The issue with this method is that buy signals appear in pairs (day after day), and in reality if you buy a ticker, you cannot buy it again the next day, before you sell the older lot. Some buy signals appear as 5 in a row for the same ticker. You would run out of cash if you buy and buy and buy without selling first
Good point! Anyhow I am addressing this in the pinned comment 😛
Be invited to check out the linked video. Would be curious about your feedback!
Excellent video. How did you know to look at the 0th index when reading the HTML with pandas? That doesn't seem intuitive?
Thanks mate. Pretty straightforward: I checked the website and was indexing for the relevant table.
@@Algovibes I see. I knew pandas could read excel/csv never knew about the read_html function. It seems very useful.
Thanks. So the next thing is how to create telegram bot / signal from this strategy?
Not using both of them but the suggestion to connect a trading signal to another application if that's an app or a mail or whatsoever is actually quite nice. Thank you very much for sharing your idea :-)
Thanks you for your work . I have a question, if close price > ma200 and rsi < 3 for 3 consecutive days then there will be 3 consecutive buy signals right?
Thank you for your knowledgeable video. I want to know, which python compiler software you are using for coding in this video.
Hi man, thanks a lot for your comment. I am using Jupyter Notebook here.
Great Tutorial.
May i know how do you know which data to pop when you run the final backtesting?
Thank you
Thank you my friend! Can you give me the timestamp?
Excellent
Thank you mate :-)
Thanks!
Welcome man! Thanks for watching.
Hello. But how do we get data for real-time RSI calculation? Thanks for the reply. 👍
Hi mate, got a ton of content which is addressing exactly that in the cryptobot playlist. Cheers!
Hi i had also problem with 'OGN' placed at index 357, after first two pop's (474, 489). So i think at start it had an 359 index.
Hi man, thx for sharing that!
after a few backtesting, this methods indeed pulled up the win rate to about 65%~70%, but its benefit diluted either
Thanks a lot for your comment. In this one I didn't cancel out overlaying positions. I actually covered taking only one position at a time here:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Let me know what you think!
Curious what the magnitude of losses are? For example if you looped through all your wins/losses and did profit = 1; profit*=current_profit, do you still end up losing despite 70%+ win rate?
Good question. The notebook is somewhere on my other laptop. I covered cumulative profits in other vids.
BTW this might also be interesting for you covering some more measurements:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Let me know what you think below that!
Very cool video, thanks for sharing - quick question: How would you edit this into a buy only strategy without any automatic selling & view the cumulative return up until the last datapoint?
Thanks for watching buddy :-)
You could apply a similar logic as the one in my most recent video. But you somehow need an exit in my opinion.
Video:
th-cam.com/video/vWVZxiaaTCs/w-d-xo.html
@@Algovibes Thanks!!
Hi algovibe. Thanks a lot for the video. The histogram shows a slightly positive mode, so the higher probability of winning; However, the total areas above and below zero are about the same. Does that mean the total wining and losing in terms of dollar amount is about the same?
Hi buddy, thanks for watching. Can you please give me a timestamp?
In general see the analysis with caution as I don't exclude overlaying trades here. I made the necessary amendments in this video here:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Be kindly invited to check that out.
Great stuff. Can I do the same thing with Backtrader framework?
Thank you mate! :-)
I didn't test that with BT yet but you probably can.
bro please can you show us how to pick real-time RSI Values with time frame 2
Covered realtime trading in the Cryptobot playlist. Be invited to check that out!
Thank you for this interesting introduction. Trying to reproduce it I'm surprised to have different values in Adj Close column, and this leads to really a lot of trades for those 503 assets (800k since 2011) and a winning rate of 56%.
Any idea why Adj Close column has been adjusted several years after quotations?
Welcome mate. depends on whether there were dividend actions, stock splits or other capital actions. BTW please check out this video here: I was getting rid of overlapping trades etc.:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Can u make a rsi strategy bot for crypto, were it buys at 40 sell at 70 atomatic??, or is there one you already made but i am to new to this channel so thats why i am asking??
I will see that I cover something like that but in my experience this strategy isn't working out. You will need to combine RSI with other indicators for better trading decisions. Anyhow thank you very much for your suggestion :-)
I don't see any buy signals for month of December 2021, will it not generate daily signals?
Depends if the conditions are fulfilled.
but all these trades do not calculate comissions right?
How do we trade with a bot without paying the comissions ar atleast account for them?
Right!
Covered topics like that in my cyptobot playlist. Be kindly invited to check that out!
Perfect example of someone that "really" knows Python.
Appreciate your kind words but there is still a lot to learn for me as well :-)
Yes, for him python is like English/French. He is so fluent and is able to implement seamlessly what he thinks
Indeed his python skills are amazing...
However he has way of complicating the simple thing..
No body can know python lol
Honestly the python code is pretty bad. Sorry to say that to the author. I do not mean to insult him, but rather I encourage to discover about code smells in python. There are hadfull of those.
In reality, had this code been structured properly, it would have been much easier to explain to the audience.
what if the datasets are in local storage???
You mean like in csvs or similar?
Great videos! But I suspect these signals will fade in the coming months as more people watch your videos. LOL
Well, I hope you are right :-D Thanks for watching mate.
Great video, excellent programming skills! So, in this strategy there is no stop loss, always wait for when it is above of RSI 40? Anyways, thanks for the effort and sharing!
Thank you very much for your comment! Really appreciate it :-)
There is indeed no Stop Loss. It could and should be considered when implementing it with real money.
Just to add: The alternative exit (if RSI condition is not happening) is after 10 trading days.
when I looped through S&P500 stocks it throws an error ValueError: cannot set a frame with no defined index and a scalar ....
did you somewhere deviating from my approach? If not can you pass me a timestamp when this error is occurring?
You could also use try: / except: to exclude stocks with data error. Than you have not to use .pop for every invalid tickers in the top.
tickers.remove('CEG') because there is no data on it
Do you plan on using Backtrader? Using `imaginary` trades and real trade simulation with a backtrader can differ by a considerable margin.
Thanks for watching mate. Are you referring to the Backtrader python library? If yes, I already took a look at that and will release some stuff on it in probably the near future.
@@Algovibes yes, also you can see my other comment, I reproduced the algorithm on TradingView. Both platforms are great for backtesting, thanks
Funnily I see that comment in my notifications but not in the comment section... Thanks a lot for your input, will have a look at that in the course of the weekend.
@@wSevenDays Hi, how did you transfer it to Tradingview?
@@tlghnkck I wrote that by myself given the rules from the video
Bro, you’re always on the awesome side of the fence :) But let me complain about few things :) the loop threw errors for BK_B and BKR_B as “no data”. Since in the year of 2022 the other stock (VICI? idk) isn’t listed no longer as SP500 firm, I didn’t bother that. But, along with the WRK, I also excluded those 2 “BK"s. But this time the empty lists of matrixsignals and matrixprofits appended only 125 of the calculated buys and profits.
I receive a value error “ValueError: cannot set a frame with no defined index and a scalar” for the rest of the data. Please advice how to fix that list error. Thanks my friend.
ps: I’d say god bless, but I know you’re an atheist, so I say may the cosmos be with you :))
tickers.remove('CEG') because there is no data on it
Do you know the best way to understand the revenue from this strategy?
Could you elaborate on "revenue"?
@@Algovibes How much profit from this strategy. Is there a way in Python to calculate how much money would have been made from this strategy?
@@michaeltolin9795 Yes sure! I am getting a little more into details on how to do that here:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Hi Nice tutorial, Thank you for showing us how to do it, I am new to python and pandas, I am getting the below error and i know the stock is not listed more than a year ago so the data is not full for that. how to avoid it
ValueError Traceback (most recent call last)
in ()
3
4 for i in range(len(tickers)):
----> 5 frame = RSIcalc(tickers[i])
6 buy,sell = getSignals(frame)
7 matrixsignals.append(buy)
2 frames
/usr/local/lib/python3.7/dist-packages/pandas/core/indexing.py in _setitem_with_indexer(self, indexer, value)
1587 if not is_list_like_indexer(value):
1588 raise ValueError(
-> 1589 "cannot set a frame with no "
1590 "defined index and a scalar"
1591 )
ValueError: cannot set a frame with no defined index and a scalar
Sorry for my late reply mate. This comment just popped up...lol.
You need to exclude the empty ones. I have done that in my newer version here:
th-cam.com/video/eEqp-iu8eI8/w-d-xo.html
is there a code I could use to link the all profits to their respective tickers?
You could just map the symbols to the returns. I have shown how you can do that with e.g. a DataFrame and a zip function here:
th-cam.com/video/YFRJ_9RVrz4/w-d-xo.html
can i use rsi for crypto trading??
Well that is a at least in my perception a very general question.
In general you should see technical indicators not as a reliable thing to predict next moves but rather see them as an orientation and combine them with other indicators.
I tested a set of technicals in this video and considered cryptos in the very end:
th-cam.com/video/r8pU-8l1KPU/w-d-xo.html
Can you please tell how to run this bot on cloud
I released 2 videos on GCP how to run Python scripts in the cloud. You might find something useful there!
What’s the point of these backtests if they don’t show returns and compare to buy and hold? Winrate is a useless metric alone
check out my other videos - answers your question.
You could be waiting a year for stock to rise back above its 200 day MA.
yea that could happen indeed.
You are also a German. Your English accent is my hint^^
You exposed me!
Hi, could anyone please explain to me why at 33:00 we do range(len(df)-11) ? The minus 11 part is really confusing. Any help is greatly appreciated. Thanks
great stuff, how can we print daily signals out of this?
thanks in advance
Thanks for your comment mate,
well ad hoc you could check if there is a signal in any of the last rows by just checking if you are getting a 'Yes' value for any of those assets.
The interesting thing would be getting notified once you are getting a signal. I will release a video on that in the upcoming months. I think that could be pretty interesting.
How to integrate it with real time broker api
Check out my cryptobot playlist pls. I am applying some strategies on live data there using APIs.
Ok
Hello ! I have parse data with my python file and getting the result in python console, now I want to export this data to google sheet. Can you help me to do that ?
Hi,
sure! What exactly are you struggling with?
@@Algovibes Thanks for the response! I found the solution by just copying it and pasting into excel by applying "data to table formula". However, I would be thankful to you, if you guide me with the code for exporting the data directly into excel. Pls give me your Discord ID if possible.
Thanks for the great tutorial!
I have a question: There are many different methods to set buy or selling points. But how would you use your budget? Would you spend it all directly on the first signal or split it? for example, you have a buy signal every week, but you have no money because your money is still in circulation. Is there any strategy how to use the budget to generate the biggest profit? I am in the process of testing a few strategies that I have put together myself, but I do not have a clear result yet.
Thanks for watching and your comment! This is a great and very interesting question indeed :-)
Budgeting would be an additional constraint, that's totally right! But I would need to have to dive deeper to give you a reliable answer to that.
Without quantitative justification ad hoc I would say you need a budget over a certain time. This budget should be flexible meaning we have a part invested and a cash pool (which could be directly connected with capital gains/losses OR a fixed untouchable budget). Designing this strategy would be an awesome project! Also it would be interesting to see if a fixed or flexible cash pool would be more efficient. Never thought about that, thanks a lot for your input.
@@Algovibes Thanks for your answer! :) I have found very little useful literature on this topic and I am trying a few ideas myself. If something useful comes out, I will inform you ;)
Do you offer python consulting at all?
Currently not, but probably in the future. I am currently spending my spare time to produce content and want to focus on that at least within this year.
Is it possible to add stop loss condition to .ex4 file
I have no experience with .ex4 files.
how do i get it and how do i deploy it?
what do you mean?
How do I use this?
Get the code for this stratagy
Continue @ 13:35 bookmark fir for self
20:55
Haha, awesome :-D I hope you had a good time watching this video.
Can this method be applied for Cryptocurrency?
Hi and thanks a lot for watching. Interesting question mate. Give it a shot and test it. Cryptotickers are e.g. 'BTC-USD', 'ETH-USD'.
Let me know your results!If you need any support just let me know. I will run the machine again then :-P
BTW I have some content on cryptocurrency analysis with Python on my channel. Be kindly invited to check that out.
Thanks mate. I will try it out and share the results with you. I have zero coding knowledge but watching your video is making it seems easier.
Thanks for the knowledge.
@@BICARAKRYPTO go search part time larry. He built one and he admitted that it is not profitable based on RSI only. Although, the strategy is a bit different from what it describes above.
Bruder, is it possible to contact you directly?
Not yet. Probably within the next months when I am setting up a mail. Thanks for your patience!
thats exactly what ı am lookıng for... Can u share code or gıthub lınk?
Awesome :-) Be invited to check out my other stuff. I am publishing the code for channel members. Be invited to become a channel member!
@@Algovibes
I don't know if I should get "supporter" or "discord server access". I'll be a supporter if it doesn't matter. If other codes are shared on your Discord server, I can choose it. I'm also building my own bot. Maybe you would like to join. Or you can teach us how to build bots.
as india nifty50 stocks, it coming out to be 60 %
Thanks for sharing buddy.
Please check out the updated version avoiding multiple positions and be invited to test it again on nifty:
th-cam.com/video/rYfe9Bg2GcY/w-d-xo.html
Hi, as a true beginner with Python programming I found your video very interesting; through this script mod could you analize and screen say 10-20 assets which returned the best profit with the lowest number of trades in a give timeframe *say 12 months? Where could I get this script to c&p in Python3? Is there a repository of your scripts?
hI
Can we get the python code ?
Have you got???
Sorry for my late reply. I didn't get a notification. I didn't publish the code yet.
Link to Jupiter workbook?
Somewhere on my old MacBook :D Sorry to disappoint you but I didn't share it somewhere yet.
Hab an deinem Akzent erkannt, dass du Deutsch bist :D
Das ist ab jetzt unser kleines Geheimnis 🤫 Versprochen, dass du es nicht weitererzählst?
@@Algovibes Versprochen 😎👍🏼
when i try to get the buying signals the list is empty, could you guys tell me how to fix it thanks !!!
Sure I am very happy to help. Where exactly do you get an empty list? Can you give me a time stamp? Did you follow the steps or did you deviate somewhere?
@@Algovibes min 24:49, i think i did follow the steps, writing the code in the same way
now the code is running perfectly !!! i do not know what did happen, but thanks again for your knowledge
@@DiegoSanchez-oy8qz Thank YOU for watching and your kind words :)
you're eating?
😁 Yes, I couldn't resist the 🍪
What is the avg of all returns made? Please share this info since it is I guess make information than the winning rate.
As the basic video is about the winning rate I kept that as the reference.
Using lambda functions inside a pandas dataframe is super slow.
Save some time with the RSI calculations with
import pandas_ta as ta.
df['RSI'] = df.ta.rsi(10)
@Algovibes I thought .apply() with lambda function is faster than using loops and is a good approach to optimizing speed with Python?
A Bollinger Band Strategy please
Hi mate, thanks for your suggestion. Anyhow I already covered BBs here:
th-cam.com/video/8PzQSgw0SpM/w-d-xo.html
This strategy keeps increasing position even when a position is already open. Making clusters of positions.
Awesome observation and I was considering that as well when recording this video but decided to keep it simple enough. When programming a trading algorithm it might be better to only go into a position which isn't already bought. Implementing that is not that of a big deal so let me know if you need any support doing that!
@@Algovibes I think I will be able to do that, haven't tried it yet though.
I tested it the other way, where it only buys if not in a position, and it had a 60% winning rate, so maybe buying even when already in the position is a good thing.
@@Algovibes I am not sure how to implement it. My idea was that the exit condition must be fulfilled before entering a new position but I dont know how to code it. Thanks for your videos. They are great!
HINDI
Sorry, what?