An AWESOME Cryptocurrency Intraday Trading strategy YOU shouldn't miss [built and tested in Python]

  Рет қаралды 16,737

Algovibes

Algovibes

Күн бұрын

Пікірлер: 107
@shaunr9950
@shaunr9950 2 жыл бұрын
Just discovered your KZbin channel and this is the first video I watched. I really like your style and approach - easy to follow, well explained and very logical. I learned a lot from just this video and I would definitely appreciate watching the follow-up video on the parameter optimization. I will definitely become a Tier-2 member - you are a quality provider of valuable content. Thank you.
@Algovibes
@Algovibes 2 жыл бұрын
Thank you very much Shaun. Really appreciate your kind words and your support being an Algovibes channel member :-)
@2k10clarky
@2k10clarky 2 жыл бұрын
I love the simplicity of this algo, honestly I think there is very limited alpha (nil after fees and slipage) in strategies that use popular indicators but this is something I don't see any ppl using. Potentially promising as Elon would say
@deniszhuravlev9874
@deniszhuravlev9874 2 жыл бұрын
So, I took your strategy, spent few days to write a bot, and understood, that 1) this is the same, as Bolinger Bands indicator strategy. 2) When you have some weeks/monthes with down trends this strategy without SL generates big minuses. So, you have to use StopLoses. 3) Period for High, low rolling for testing should be from 10 to 450.
@Algovibes
@Algovibes 2 жыл бұрын
Thanks a lot for watching and sharing your approach!
@greg9540
@greg9540 2 жыл бұрын
Great video as always. It'd be brilliant to see the follow up, optimisation, video on this. I'm on the edge of my seat! 😁
@Algovibes
@Algovibes 2 жыл бұрын
Thanks Greg!
@fredycoral
@fredycoral 2 жыл бұрын
I liked the strategy and your clean coding. Waiting for the next bot-video
@Algovibes
@Algovibes 2 жыл бұрын
Thanks a lot :-)
@hamzavictor2385
@hamzavictor2385 2 жыл бұрын
I love the idea of the next video already. The optimisation will be a practical lesson to learn.
@Algovibes
@Algovibes 2 жыл бұрын
Thx for your feedback Hamza!
@giodimasi4123
@giodimasi4123 2 жыл бұрын
will you do the follow up optimization video? Great work as always anyway.
@Algovibes
@Algovibes 2 жыл бұрын
Thanks a lot Gio :-) I already coded it, but not quite sure if I will publish it. Video got not enough traction to continue the series.
@flydr2
@flydr2 Жыл бұрын
Again... wonderful teacher... many thanks
@Algovibes
@Algovibes Жыл бұрын
Thanks a lot Marc!
@FireFly969
@FireFly969 2 жыл бұрын
I miss this channel It's been more than 13 days for the last video
@FireFly969
@FireFly969 2 жыл бұрын
It's a great strategy I think it still can be optimised using stoploss takeprofit, add short and long sell, try other intervals, using leverage so the fees will be small(that's if it's profitable on the long term) and if it's not profitable and give a lot of losses we can reverse the buy and the sell conditions
@mohammednasser6948
@mohammednasser6948 2 жыл бұрын
I think You can automate optimization for your parameters(backtesting window,...) using algorithms such as DE which has a very simple implementation in scipy library to optimize your profits.
@carlocarnevali7790
@carlocarnevali7790 2 жыл бұрын
Are there any tutorials for this? I’m new to programming, trying to find out new ways to make some gains
@quintanilha_jr
@quintanilha_jr 2 жыл бұрын
Following
@Algovibes
@Algovibes 2 жыл бұрын
Cool idea. Anyhow for the next one we are pretty much just using a brute force approach passing a range of parameters and finding the window with the best return.
@willsandiford5345
@willsandiford5345 2 жыл бұрын
@@Algovibes I know I probably sound annoying, but seriously use testing data before turning it into a bot. You could make serious losses otherwise. You probably already knew that but just saying in case (:
@fernandopereira3580
@fernandopereira3580 2 жыл бұрын
What is DE ?
@Divertor
@Divertor 2 жыл бұрын
nice video as always, very educional. please make a bot out of this or a crypto bot with other strategies like a scalping bot
@Algovibes
@Algovibes 2 жыл бұрын
Thanks :-) Will see what I can do!
@estebansantamaria8729
@estebansantamaria8729 2 жыл бұрын
Great! Thats so interesting man.
@Algovibes
@Algovibes 2 жыл бұрын
Thanks for watching mate! :-)
@muggzzzzz
@muggzzzzz 2 жыл бұрын
Hey, I made a MetaTrader4 script with this strategy with a little change - I made it two sided since I can have both sell and buy orders simoultaneously. I'm opening a sell market order when the price crossing the mid line from above to below and closing this position when the price touches the minimum low line, and vice versa. And it shows suspiciously good results. In order to avoid the looking forward in history, I didn't use 0 indices on bar hisory.
@waqarhaq5280
@waqarhaq5280 2 жыл бұрын
what is accuracy ?
@muggzzzzz
@muggzzzzz 2 жыл бұрын
@@waqarhaq5280 didn't get your question honestly. What accuracy? Backtest accuracy?
@2k10clarky
@2k10clarky 2 жыл бұрын
Sounds like over fitting, have you tried changing the params and lots of different assets? Uptrending, ranging and down trending assets?
@muggzzzzz
@muggzzzzz 2 жыл бұрын
@@2k10clarky it definitely is not an overfitting because it does the same thing on other currencies without any tweaks, I didnt do any optimization.
@diegojorda2600
@diegojorda2600 2 жыл бұрын
hi bro, binance doesnt charge for selling the asset. Great video, its helping a lot.
@eastwesttrading269
@eastwesttrading269 2 жыл бұрын
Hi! I think an interesting angle you can pursue is to try and write an algo that uses multiple profit levels. For example, we buy when price closes above the 50 MA, sell 50% at the 100 MA and the other 50% at the 150 MA all OCO a stop with a close below the 25 MA. I seriously doubt that would work as a strategy, but I have been trying to code a system that uses multiple profits and have found it more challenging than it should have been to execute. I would love to see how your expertise would work around and solve this problem! Thankyou for all your awesome videos!
@Algovibes
@Algovibes 2 жыл бұрын
Thanks buddy for your comment. Noted your suggestion!
@eastwesttrading269
@eastwesttrading269 2 жыл бұрын
@@Algovibes I did eventually work it out myself, but it could be a good demonstration on how to properly layer IF statements for people who are still learning programming
@alivarfan1009
@alivarfan1009 2 жыл бұрын
Great video. Can you try to adapt this strategy to trade in both directions? Both opening buy and short positions?
@deniszhuravlev9874
@deniszhuravlev9874 2 жыл бұрын
Add df[lowapproach] = ... Colse < df.rolling... Add df[close_a_mid_2] = ... Close < df.mid... Add df[midcross_2] = (the same code, but with [close_a_mid_2]) And you can use sells too. P.s. If you don't understand his code, It won't help u.
@ahmetbinatlioglu8848
@ahmetbinatlioglu8848 2 жыл бұрын
Love your work bro
@Algovibes
@Algovibes 2 жыл бұрын
Thank you very much for your support man
@hannes6116
@hannes6116 2 жыл бұрын
Once more cool. I think the entry could bei calculated by testing just the close > mid and close -1 < mid
@Algovibes
@Algovibes 2 жыл бұрын
Thx mate!
@c0nfuser
@c0nfuser 2 жыл бұрын
hey, when you mean Close price it is actually current price right? I guess running this in real time are you checking the previous close price or checking the current price? Also regarding highapproach you mentioned in the beggining "near rolling max" but you actually checking if is greater than that? (and not checking if is also lower?) Do I miss something? Cheers
@Algovibes
@Algovibes 2 жыл бұрын
It is the last available close price, not the current price. In a realtime environment you would take the realtime price from e.g. a live data stream (covered topics like that in the cryptobot playlist). No I am checking if it is near the rolling max, that's why I am using this discount factor (0.996).
@vaaronka
@vaaronka 2 жыл бұрын
So I just started learning algorithmic trading and I had a complete plan how to achieve that I prepared books, articles, courses etc ... but I ended up a "one fit for all" channel with you ! So million thanks for making easier this path :D I'm also wondering, about what Strategies and which technical indicators do you prefer and why (maybe you can make a video about that also :) ) So thanks a lot !
@willsandiford5345
@willsandiford5345 2 жыл бұрын
A warning about optimising. I used a genetic algorithm to optimise 3 parameters on this strategy and got over 100% return over the time interval. When I tried those parameters on data it hasn't seen I got a 10% loss ): Just make sure you use testing data before turning it into a bot.
@ianholloway9493
@ianholloway9493 2 жыл бұрын
Yeah I was testing the DE algo as well and got somewhat simular results. It seems as though the algo favors the 100% gain in the influencing the of the rolling average values even though that not what creates the most gains on average.
@fernandopereira3580
@fernandopereira3580 2 жыл бұрын
@@ianholloway9493 What is DE?
@tc8557
@tc8557 2 жыл бұрын
That's overfitting. Should use several assets, several different timeframes, run it, aggregate and compare data and select the best one on average
@willsandiford5345
@willsandiford5345 2 жыл бұрын
@@tc8557 I know what overfitting is. I used 70 different coins and trained it on 4 years of data and tested it on 1 year. Multiple epochs of randomly selected yearly time periods within those 4 years. So many methods to avoid and reduce overfitting. But the results were either it did really well or really bad and averaged -10% return on all coins.
@yoyokoko5153
@yoyokoko5153 2 жыл бұрын
I wanna like it again. I am pretty good at python and your video inspired me to get into pandas world. I'm working on improving the strategy for about 3 days now and it's really fun thanks
@Algovibes
@Algovibes 2 жыл бұрын
Thanks a lot for your comment. Be invited to like my other videos then! 😇
@behdad0979
@behdad0979 2 жыл бұрын
very nice like alwayes, love you😍
@Algovibes
@Algovibes 2 жыл бұрын
Love you too! Thanks for your kind words.
@davidmilligan4751
@davidmilligan4751 2 жыл бұрын
very interesting idea but would it have not been more profitable to buy below the average line? this is similar to the BB strategy that the big banks use in that below the average is a cheap buy in and above the average line is a good sell point and as long as the algo is checking to make sure the price is higher than the original buy price this could be done on a very frequent basis making for a profitable system if im correct? please let me know your thoughts on this idea
@Algovibes
@Algovibes 2 жыл бұрын
Interesting thoughts - thanks a lot for sharing them. What does backtesting this yield?
@ayush2626
@ayush2626 2 жыл бұрын
Any reason why you decided to go with for loop rather than vector based? Also if I am not wrong, that too is based on for loop with range len? Surprisingly this loop is working much faster than the previous versions.
@Algovibes
@Algovibes 2 жыл бұрын
More intuitive and easier to implement in that case.
@agentcog2916
@agentcog2916 2 жыл бұрын
Really good content, sad that those strategies are not working on bearish market right now, tried yours and even within modifying parameters and assets, keep getting loss for over 1000 hours of trade
@Algovibes
@Algovibes 2 жыл бұрын
Thanks mate. Yeah sure, it‘s a crashing market. There are very few possibilities if any at all to profit (considering the long side)
@harshadbhirud
@harshadbhirud 2 жыл бұрын
By logic buy order will fire at mid point value and cover order on highpoint value. This will be correct depiction of trades else it os showing 0 profit on your 1st trade which is not the case.
@Algovibes
@Algovibes 2 жыл бұрын
Can you elaborate?
@harshadbhirud
@harshadbhirud 2 жыл бұрын
@@Algovibes tradedfmod = pd.DataFrame([buydates,selldates,\ df.loc[buydates].mid,df.loc[selldates].rollhigh]).transpose()
@deniszhuravlev9874
@deniszhuravlev9874 2 жыл бұрын
It looks proffitable. Wana ask u to make the trading bot with this strategy.
@Algovibes
@Algovibes 2 жыл бұрын
Thanks for your feedback!
@louisvuittondonvg9040
@louisvuittondonvg9040 Жыл бұрын
Where is the stoploss in this algo? How does this algo know to exit a long position if it doesn't reach the highapproach value? this seems like a serious issue with this
@sebastianstaviany7822
@sebastianstaviany7822 2 жыл бұрын
do you have a discord group?
@Algovibes
@Algovibes 2 жыл бұрын
Not yet, but surely will set up one soon.
@christosck
@christosck Жыл бұрын
Hi mate, having some trouble getting the loop to work, not sure why. It just executes the first buy/datetime and then stops there. Have you tried executing this recently ?
@christosck
@christosck Жыл бұрын
I also tried turning the high approach to True/False, but still the same result.
@christosck
@christosck Жыл бұрын
got it to work, thanks for the material btw. great stuff !!
@Algovibes
@Algovibes Жыл бұрын
Thanks mate :-) Awesome that you solved it on your own.
@christosck
@christosck Жыл бұрын
@Algovibes btw something i noted actually running it on binance. if your starting balance on spot is 0, the script fails. cause purchased and then into wallet quantity ends up being less. i.e. 4000 becomes 3976. i understand it's the binance take. so have to set sell side quantity to spot holdings whoch currently I'm working on OR, just have excess spot in wallet for particular pair. I used the principles from another one of your videos to set up the trading strat to work woth logic from this video. perhaps you can revisit that other video and see kzbin.info/www/bejne/on_Ze4uBjbqElbc
@pooleiahmor
@pooleiahmor 2 жыл бұрын
Hi mate, i was using Spyder for python but it keep saying "getdata" is not defined. Any idea?
@Algovibes
@Algovibes 2 жыл бұрын
Hello! You need to make sure you defined the getdata function in your script.
@SureshSharma-qy2zk
@SureshSharma-qy2zk 2 жыл бұрын
Which video editor you use?
@Algovibes
@Algovibes 2 жыл бұрын
No one :D Unfortunately!
@ventiladorbueno1846
@ventiladorbueno1846 2 жыл бұрын
Thank youu!!!!!!!
@Algovibes
@Algovibes 2 жыл бұрын
Thanks for watching and your support :-)
@sazamhashmi
@sazamhashmi 2 жыл бұрын
Hi, i was using this kind of strategy which i learned from one of the young youtuber chap. Beautiful video to automate it. You're an amazing guy. Is it possible if i share an strategy and you could automate it?
@elprinz6604
@elprinz6604 2 жыл бұрын
Can we discuss more. I am also open to automating strategies
@Algovibes
@Algovibes 2 жыл бұрын
Thanks a lot Azam! You can share whatever you find interesting. I cannot promise to cover everything but I will try my best to cover topics which I also find interesting and are doable within a 20-30 min video.
@FireFly969
@FireFly969 2 жыл бұрын
Hi, I have an idea that I search how to make it But I don't found anything will help me It's create a trading strategy (like sma15 < sma20....)and let ai choose the best inputs for the indicators I mean let the ai try sma1 sma20 sma3 and like that till find the best inputs The strategy that I give it's simple just for example to understand better I you can do videos in how to build something like that ai that auto generate trading strategies using python I'm sorry for the bad English And thank you for those videos, I really love this channel
@connectrRomania
@connectrRomania 2 жыл бұрын
I have been thinking about this idea for a long time, If you are open to collaborate we can help each others
@FireFly969
@FireFly969 2 жыл бұрын
@@connectrRomania yes we can collaborate How can we communicate with each other?
@its_code
@its_code 2 жыл бұрын
I love 💕 this video 😍😍😍😘😝. Very helpful 😍💕😊
@Algovibes
@Algovibes 2 жыл бұрын
thanks buddy
@rafalsza
@rafalsza 2 жыл бұрын
please present a vectorbt
@Algovibes
@Algovibes 2 жыл бұрын
On my list! Thanks a lot for the suggestion.
@deniszhuravlev9874
@deniszhuravlev9874 2 жыл бұрын
While I was tasting your strategy, i got good results with LUNAUSD, but then i foundout, that trading with this coin had been stoped.🤪😅
@Algovibes
@Algovibes 2 жыл бұрын
😆
@itayhilel2168
@itayhilel2168 2 жыл бұрын
Ok
@Algovibes
@Algovibes 2 жыл бұрын
🤔
@olivierdefosse5956
@olivierdefosse5956 2 жыл бұрын
Dear god, thank you for your insights and for all your ideas that make a new path spring up in us ;-) I'm trying to automate a strategy, based on what I've learned from your videos, but nothing works spectacularly: I have a small SQL database on MSAccess for organization, task sequencing, and logging for transactions analysis that were carried out, and statistics in order to create new ideas. I also have 3 Pyhtons scripts for the implementation of a framework that can use all the strategies you talk about in your videos... I'm really not very good at dev, you can call me a newbie, to be honest, but I always find a solution to what I want to do. In short, I come to what I want to say: I can do all the strategies, in the short or long term, by changing the parameters on the left and on the right, nothing works asit should in the end, no strategy is winning... and worse, when I backtest it and it seems really great, I put it in Prod and directly after, I only have false start with small losses but no more gains... HELP ;-) :-( If you can give me something profitable in the long and in the short...? ... the shorter and more profitable the best, of course :-))))) I wonder also if there is a possibility to interract with 'tradingview 'from which we could retreive so many information, so many indicators that can help in our strategies ... Have already worked on that ? Have everyone a nice day
@Algovibes
@Algovibes 2 жыл бұрын
Thanks for being part of the community Olivier! Building a trading bot is a process, there is no "magic formula" how you can consistently profit. What I am trying to teach isn't profitable trading bots but the programmatic approach to transform ideas into code, being able to screen and adapt/amend to new market situations.
@olivierdefosse5956
@olivierdefosse5956 2 жыл бұрын
@@Algovibes and what about some interaction between trading view and python? I think you never browse this topic... this would be very interesting and I already search for this without any success. Anyway: thanks for all your lights ... and also your time to respond to all the comments you receive.
@youkozel
@youkozel 2 жыл бұрын
Hey, love your videos I would like to see you backtesting with some indicators (like ichimoku cloud, PSAR, Bollinger Bands) Also I think it need much more attempts with different time lapses and parameters to see if it's profitable in a long term And I think would be nice to see you create Discord or some other social to discuss and optimize strategies with your community, but I understand it might be time consuming Keep it up!
@Algovibes
@Algovibes 2 жыл бұрын
Thanks a lot buddy :-)
@hypedstocksprices5963
@hypedstocksprices5963 2 жыл бұрын
yes creating a discord could be very cool. If he don't do it maybe we could ? Are you down ?
@pantolinho99
@pantolinho99 2 жыл бұрын
Do you have discord?
@Algovibes
@Algovibes 2 жыл бұрын
Setting one up within this year. Asking for a bit of your patience.
@pantolinho99
@pantolinho99 2 жыл бұрын
@@Algovibes thank you very much, looking forward to be part of your group.
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26
Who’s the Real Dad Doll Squid? Can You Guess in 60 Seconds? | Roblox 3D
00:34
World‘s Strongest Man VS Apple
01:00
Browney
Рет қаралды 36 МЛН
Mom had to stand up for the whole family!❤️😍😁
00:39
The New Python 3.13 Is FINALLY Here!
20:39
ArjanCodes
Рет қаралды 32 М.
Cracking Enigma in 2021 - Computerphile
21:20
Computerphile
Рет қаралды 2,5 МЛН
Microservices are Technical Debt
31:59
NeetCodeIO
Рет қаралды 494 М.
The Problem With Microservices
17:47
Continuous Delivery
Рет қаралды 435 М.
[1hr Talk] Intro to Large Language Models
59:48
Andrej Karpathy
Рет қаралды 2,2 МЛН
What AI means for your product strategy | Paul Adams (CPO of Intercom)
1:23:01
She's very CREATIVE💡💦 #camping #survival #bushcraft #outdoors #lifehack
00:26