and ... to avoid those invalid "buys" I suggest to change three lines: (1) instead of "for i in range()", use a while loop while i < len(df), (2): after the "sell" signal set i to i = i +j, (3) add i += 1 right befor the end of the while loop to iterate further trough "Buy" signals.
@B.St92 жыл бұрын
Danke für dieses Jahr und deine Videos! Ich bin 18 geworden und versuche mir gerade alles selbst beizubringen, was manchmal ziemlich hart ist... doch dank deinen Videos geht das alles etwas leichter :* Ich wünsch dir einen guten Rutsch und bin schon sehr gespannt auf das nächste Jahr :) Mach weiter so und bleib dran du leistet super Arbeit! Benni PS: Ich weiß 2€ sind nicht die Welt aber ich probiere mir grad echt etwas aufzubauen mit deiner Hilfe und als ein kleines Danke reicht es hoffentlich ;)
@Algovibes2 жыл бұрын
Wenn du dich mit 18 für diese Themen interessiert, dann hast du mittel/langfristig gewonnen. Danke für dein Kommentar und deinen Support. Und auch für die monetäre Wertschätzung 😛
@bernhardsturmer80032 жыл бұрын
Hallo, bin schon sehr neugierig auf diesen Trading bot. Hab bis jetzt jedes Video angesehen und bin immer wieder erstaunt wie einfach das bei dir aussieht!
@Algovibes2 жыл бұрын
Danke mein Bester :-)
@jamesreilly40522 жыл бұрын
i never usually comment on videos, but your content is very engaging and i like the way you present. As everyone else has said below you're helping the community and enabling everyone to complete their ideas.
@Algovibes2 жыл бұрын
Thanks a lot man. Happy to read that! :-)
@Ctrlshiv2 жыл бұрын
No words mate, just awesome, I'm having some issues with some imports, getting some errors on the way but that's mostly my fault so, I'll be starting from 0 to set programs again, appreciate the work out on the video, simply amazing. Prost!
@Algovibes2 жыл бұрын
Prost 🍻:D Thanks for watching man, appreciate your kind words.
@brich81102 жыл бұрын
A big thanks, you're helping a lot the community.
@Algovibes2 жыл бұрын
Happy to hear! Big thanks for watching :-)
@matthew25316 ай бұрын
My friend fractal must have as a repetition that is independent of time... Do you remember how fractals were found in The BELL companies telephone lines? Entire branches of telephone cables failed in the same order regardless of the amount of power Voltage, Amperage, or the Frequency or Amplitudes which that power conducted at.
@Algovibes5 ай бұрын
Interesting one!
@jenaman00012 жыл бұрын
One of the best videos on trading strategy, I liked the content and the way that you have expalined and simplified things. I have one request , as you have mentioned to create a trading bot somewhere. Caa you please create one video on creating a trading bot (with Live stream) and equities if possible. (both Long and Short)
@theafricanquant5012 жыл бұрын
great video as usual! Happy Holidays to you and yours. Wishing you a prosperous New year ahead.
@Algovibes2 жыл бұрын
Thank you my friend! :-) Same for you!
@monksofzero2 жыл бұрын
Hi. Just a nit...at 3:00 you introduce the ta.trend.ema_indicator( ) with a window=200. You say "we are calculating the 200 days moving average" and using the "window of 200 days". Instead I think you meant a window of 200 periods based on 15 min intervals. Always learn a lot from your videos.
@Algovibes2 жыл бұрын
Thanks man, happy to hear that. Yes you are right, I actually catched that while cross checking the video but noticed I said it the right way multiple times before and after so I was dealing with it.
@hannes61162 жыл бұрын
Similar code like in other Videos, this simplifies adaption. Great thank you. And again it's a great source of learning
@Algovibes2 жыл бұрын
Thanks mate for your feedback!
@brazilianstraddle69432 жыл бұрын
You might want to consider showing plots of your indicators and buying / selling signals in your videos. Great content!
@Algovibes2 жыл бұрын
Thanks man! That name tho :D Also thanks for the suggestion. Doing that in most of my vids but was lazy here. But in the end the logic of plotting the signals is always the same, so you could just combine the code on one of my other vids.
@sevir4082 жыл бұрын
Great video! For 12:15 I would have rather checked if the "Low" of a subsequent candle was below the SL or the "High" of the subsequent candle was above the TP instead of the closing price... This would probably be more realistic, but also of course more complicated as both could be true for a candle...
@Algovibes2 жыл бұрын
Thanks a lot for your comment and sharing your approach!
@mako57082 жыл бұрын
Also noticed this. In such case I would call it a SL to make it even more realistic :-D bigger chance for a loss.
@pjaborges2 жыл бұрын
I suggest adding one more boolean column to keep track if you are in a trade or not. Use the value on this column in the buying or selling rule. Turn the value to 1 when entering, turn to 0 when exiting. I think it will make the code way cleaner. Another suggestion is that I think you should consider the value of the fractal itself as entry not the close. For that you check if the range of the candle contains the fractal value. Considering the close value you may enter very far. Additionally, you may get the TP or SL within the same day if it is also within the range of the candle. I think locking the fractal is not very wise. If the price moves to much in the opposite direction the fractal becomes obsolete and not given the chance to enter in that direction for very long time. The example you present at minute 9:48 shows clearly that you could have enter at the fractal value since the candle low is below the fractal value. Also, it seems to me that this fractal is placed in the wrong row, you just know it after a couple of rows after. Quite curious about what would be the results by implementing my suggestions ;) Thank you for sharing the knowledge!
@Algovibes2 жыл бұрын
Hey Paulo, Thank you very much for your contribution. Quite some time since I recorded this video but your suggestions seem to make sense in the first place. Thanks!
@pjaborges2 жыл бұрын
@@Algovibes You may be quite busy with other things but in case you find the time to revise this code just let us know the new results ;)
@PavelSumik2 жыл бұрын
Great work, your videos are awsome, all best to the New Year
@Algovibes2 жыл бұрын
Thanks buddy. For you exactly the same!
@boscofong74222 жыл бұрын
Thanks for sharing this valuable video ! May I understand from you on why center=True was used for Line 9 ? Will that introduce forward-looking bias to the whole backtesting result ?
@Algovibes2 жыл бұрын
Thanks for watching man. Can you elaborate?
@boscofong74222 жыл бұрын
@@Algovibes Since you are using center = True, therefore for all calculated values in that column, it will be using half of the sample from the past and half of the sample from the future (instead of using all the samples from the past). This is forward looking bias since future values are peeked to determine the current action.
@cedriclebocq10602 жыл бұрын
Hello. Nice video as usual. Thx for your work, i learn a lot thanks to you. Perhaps to improve the strategy, we can think about shorting if we are under 200 Ema.
@Algovibes2 жыл бұрын
Thanks buddy. Yep, as said in the video you can apply the logic vice versa for the bottom fractal and EMA below 200.
@nguyenduyta71362 жыл бұрын
Hi , thank for great video. Hoping next time, would you please making supply demand strategy? Happy new year for big success Men
@Algovibes2 жыл бұрын
Thank you very much man! Same for you. Also thanks for the suggestion.
@thechrism22492 жыл бұрын
Another awesome video! I am currently working on a platform where users build and backtest trading Algorithms without code. Do you ever do joint projects with viewers? Would that be interesting for you?
@Algovibes2 жыл бұрын
Definitely something what I would consider in the future. But I am currently swamped. Job, KZbin, Family and friends I have to take care of. If I got more time this is definitely something which I would be interested in!
@zonlee2485 Жыл бұрын
useful for beginner
@Algovibes Жыл бұрын
That's not even remotely beginner content but I am happy you found it helpful!
@abdul-rhmanskhnyh15102 жыл бұрын
thanks for your video that was so helpful👌 can you please show us how to use stop Limit order function from binance library?! And I wish you a great and happy new year;)
@Algovibes2 жыл бұрын
Thank you mate. Same for you, happy new year! 🎆:-)
@charlesmosongo2 жыл бұрын
Great video as always. Cold this be modified to indicate levels of support and resistance, and subsequently change when the level is broken
@Algovibes2 жыл бұрын
Thank you mate. Sounds like an interesting idea. You mean like the fractals as resistance bands?
@charlesmosongo2 жыл бұрын
@@Algovibes yes something like that, but particularly, levels that can change if price breaks above or below it
@cefmanagerАй бұрын
Hi i know I am a bit late to this video, but how would you go about calculating the profit in dollar value instead of in percentage value like shown in the video. To give you a better understanding of the realised/unrealised gains.
@AlgovibesАй бұрын
You mean absolute profit? Would be sellprice - buyprice and then just summing up the profit.
@GustavoLeig2 жыл бұрын
Great video, any tips on how to install the ta lib on windows?
@Algovibes2 жыл бұрын
Thanks man! Using a Mac and a simple pip install ta did the job for me.
@suchan78892 жыл бұрын
good stuff. can you run this python on ES futures. I suspect it'll work well given the micro market structures in ES futures.
@Algovibes2 жыл бұрын
Thanks a lot man. Hm, I didn't have exposure to that yet. At least not in a financial programming context.
@RC-nm6ti2 жыл бұрын
Thx! Which broker are you using for realtime data API and real trading ?
@Algovibes2 жыл бұрын
For cryptos: Binance // For stocks: Trade Republic (German app) and I also played around with Interactive brokers.
@Ctrlshiv2 жыл бұрын
Btw I was thinking about why the profits is negative, it'll be awesome if we could recognize fake signals with the script :D, anyway appreciate it!.
@ayush26262 жыл бұрын
@Algovibes Yes! Lot of libraries generate fake signals, would be a great topic. :)
@wyatt092774870732 жыл бұрын
Hello Sir, Can you share the dataset you used as I know there is a limited time period where we can download the data you used in yfinance For result replication just to be sure I followed your tutorial Anyways great Video Very clear explanation
@Algovibes2 жыл бұрын
Hi mate, can't you just pull the data via yfinance?
@wyatt092774870732 жыл бұрын
@@Algovibes I cant pull data older than 60 days i think
@ggtechnocracy67092 жыл бұрын
How to place trades in MT4 using python ? Please explain some indicators based strategy.
@Algovibes2 жыл бұрын
Thx for the suggestion
@ghaithalmasri30392 жыл бұрын
Hi i know It’s an old video but im just curious. Is there a way to set a certain stop loss/take profit? Lets say 0.96 sl and 1.08 on all of the trades. Is this possible with np.where?
@Algovibes2 жыл бұрын
Hi mate, didn't I cover exactly that in this video or do I remember it wrongy?
@ghaithalmasri30392 жыл бұрын
@@Algovibes probably in another video :)) ill keep searching
@ohnodontdoit45112 жыл бұрын
Is there any videos or books you recommend for a beginner to get started into trading
@Algovibes2 жыл бұрын
Well trading is a big field. Options Trading, Futures Trading, Stock Trading, private Trading, institutional Trading,..... What are you interested in?
@ohnodontdoit45112 жыл бұрын
@@Algovibes stock, options or crypto were the ones I was thinking of going into
@ondrabill66402 жыл бұрын
Hey, your great videos rly help me a lot, thank you very much ♥ And I have a question, If I am trading on binance futures for example BTC/USDT. Can I open second trade even if first trade don't hit stop loss or take profit yet?
@Algovibes2 жыл бұрын
Hey man, thanks a lot for your kind comment 💜 . Wouldn't know why that isn't possible.
@SIMONONLY2 жыл бұрын
awesome
@Algovibes2 жыл бұрын
Thanks a lot mate
@robertorobert78372 жыл бұрын
Hallo, Is n bisschen anstrengend Dir zuzuhören wenn du day/date anstatt candle sagst. Die Idee aber is cool. Der EMA ist zu lang 20 wäre besser, aber es ist beeindruckend wie wenig Verlust das macht. 0.15% oder so? Cool. Ich würde den EMA ganz weg lassen (hat ja nix geholfen) und stattdessen die fractal Funktion um die Möglichkeit des Verkaufs erweitern. Zumindest in Deinem Beispiel hätte der Verkauf wesentlich öfter getriggert werden müssen als das Kaufen und guten Gewinn gemacht, selbst wenn trotzdem alle Käufe stattgefunden hätten (was ich nicht glaube) würdest du gute Gewinne machen... Gute Idee, Danke
@Algovibes2 жыл бұрын
Stimmt, muss candles heißen. Sorry! Vielen Dank für deine Vorschläge :-) Ja ich hatte das mal als Bot überlegt, vielleicht bau ich den noch. Schauen wir mal. Dann guck ich mal ob ich deinen Input irgendwie einbringen kann.
@bobshi44682 жыл бұрын
Hey is there anyway for us to support you? Do you have a patreon?
@Algovibes2 жыл бұрын
The best way to support me is to watch my vids, like them and leave a comment :-) Thanks for your support!
@hammerjoe20082 жыл бұрын
How can we sugest ideas for strategies for future videos?
@Algovibes2 жыл бұрын
Always!
@hammerjoe20082 жыл бұрын
@@Algovibes but how do we get in touch with you?
@theemperor11432 жыл бұрын
Can you help me please convert this code from pine script to python x2 = close avr = ema(abs(x2 - x2[1]), 20) r2 = ema(avr, 39)*3.5 filt = x2 filt := nz(filt[1], filt) filt := x2 - r2 > filt ?x2 - r2 :x2 + r2 < filt?x2 + r2 : filt
@Algovibes2 жыл бұрын
No exposure with Pine. Sorry!
@ventiladorbueno18462 жыл бұрын
Thank youu
@Algovibes2 жыл бұрын
Thank YOU for watching!
@cjansenson11 ай бұрын
Do you realize that by setting center=True this trading strategy peeks into the future to make buy decisions?
@Algovibes11 ай бұрын
No need to realize because that's the point here. You make the decision 2 ticks after the center so there is no look-ahead bias.
@cjansenson11 ай бұрын
@@Algovibes Got it!
@happyhuman75552 жыл бұрын
SL need to be modified.. Thank you.. :)
@Algovibes2 жыл бұрын
Thanks for watching man. Probably! What would you do different?
@HyiPizdaSkovoroda2 жыл бұрын
please write pattern ABC (1-2-3) in next video
@Algovibes2 жыл бұрын
Would be quite an interesting coding task. Thanks for the suggestion. Anyhow that won't be one of my next videos. But I noted it!