Step-by-Step Guide to Building a Fibonacci Retracement Forex Trading Indicator in Python

  Рет қаралды 24,218

CodeTrading

CodeTrading

Күн бұрын

Пікірлер: 81
@inbrandtive
@inbrandtive Жыл бұрын
I'm new here, been looking to learn python algo trading to code my strategies and found your channel. I love your videos, keep it going man.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for your support, and welcome aboard!
@mmustap3
@mmustap3 Жыл бұрын
Man you're always providing such golden content. I really appreciate your videos.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Glad you like them! Thank you for your support, if you have any specific indicators/ideas let me know I might (depending on the idea :) ) go for it in one of my videos. Good luck!
@vassiliscapsis5828
@vassiliscapsis5828 3 ай бұрын
Excellent coding, somehow difficult for my knowledge level and the results are also very interesting. 26 trades in 3 months is like a trade every 3 days (1-2 trades a week). It certainly needs a deeper look. Thank you Ziad once again
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Thank you Vassili, I think this is a good indicator to add but keep the trading for the trader it can't be fully automated yet.
@dorontobiano1134
@dorontobiano1134 Жыл бұрын
Great video, as always! Following this video, can you make a video on the ICT silver bullet? The retracement is important in this strategy. Thank you for all these videos !
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for your comment, I am adding it to a long list, I hope you are not in a rush :) thank you for your support!
@joshuawalker2154
@joshuawalker2154 Жыл бұрын
Was looking for this comment
@sweealamak628
@sweealamak628 Жыл бұрын
Fibonacci Retracement is quite reassuring when used correctly. I've coded my own with good old fashioned For Loop rather than Dataframe Vector approach because I get to understand the price journey. Just one friendly comment about the thumbnail: I think reversal didn't occur at the (edit:0.768) level, it occurred later when a large down belt & Doji appeared. The Fibonacci lines can still be used but rather than retracement for a continued trend, you can use it for the exact opposite reason: identifying the end of a short term trend. Consider exploring 😊
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, thank you for sharing, you are actually right the Doji confirms the signal, numerically the signal is triggered earlier because the only condition is to be in the golden zone, maybe I might add an additional condition with a candle pattern in the golden zone, I think I like this :)
@weifengyam6229
@weifengyam6229 Жыл бұрын
Hello! How do I incorporate this into the trading bot code you have provided earlier?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Good question, this one has to be done through a video to be honest, way too long for a comment, I will consider it as a priority (I had this in mind for one of my next videos).
@lucksimi3320
@lucksimi3320 Жыл бұрын
Hi Can you code in phython wyckoff accumation distribution, thanks
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, I am adding it to a long list, will get there eventually! Thank you for the idea.
@lucksimi3320
@lucksimi3320 Жыл бұрын
@@CodeTradingCafe Hi Do you code for individual privately?
@ithaca2076
@ithaca2076 Жыл бұрын
I absolutely love your videos - even though I'm not much of a trader you can still apply this knowledge to other kinds of analytics. Have you ever considered making a trade management algorithm? Where instead of setting fixed tp values for example, you set them as variables to better narrow down your margins?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, this is my very next video, dynamic trade management has big influence on the results, and I never included anything of the sort in my videos so far, hopefully I will manage to record something in the coming weeks. Thank you for your support :)
@rodolphedevaureix557
@rodolphedevaureix557 Жыл бұрын
Hi, thanks for your video. I think we can never have dtn == 1 AND upt == 1 (cf. 3'10), because either open or close are necessarily above or below the EMA. The unclear pattern (EMA signal == 3) is when we have both dtn and utn == 0, which means some of the 15 candles open/close above the EMA and some open/close below. Don't you think?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
hi, thank you, you are correct for the first one. For the second idea it's not a problem because when we have both dtn=0 and utn=0 then we have no signal we're just skipping.
@mohmedtaalibi7861
@mohmedtaalibi7861 Жыл бұрын
thank you i m from moroco i love your worke i m debaut i still learning
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you for sharing, you will enjoy coding in no time, good luck!
@santhoshdasari7
@santhoshdasari7 Жыл бұрын
Thanks a lot for sharing 🙏 If u could please code for “range filter 5min”
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hello, can you provide more details please? thank you
@santhoshdasari7
@santhoshdasari7 Жыл бұрын
@@CodeTradingCafehis is Treading view indicator…
@lch4025
@lch4025 Жыл бұрын
the strategy is quite good, however I have noticed that during the calculations of rsi and ema the first value (window 12 and 150) are rid and become None which has impact for further calculations.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you, it's totally normal because you need at least x amount of candles to compute the RSI and the EMA so no values are computed before these candles.
@guruofcash
@guruofcash Жыл бұрын
Your channel is great! can I use your videos and explain them briefly with reference to your channel in my language (turkish) as a post in twitter?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Sure you can! thank you for your appreciation!
@livrevous6993
@livrevous6993 Жыл бұрын
Thank you for all these explanations. I would like to ask you something please. can you trade directly with this code? How I can do it please? maybe my question is stupid 😊
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
It's not a stupid question, at the end we build these codes to put them on the market. As is the code is not tuned for live trading, still needs and API connection to a broker and some tweaks, this is just a backtest of the indicator. Check this video kzbin.info/www/bejne/jZTJfJSQgZmppqM
@livrevous6993
@livrevous6993 Жыл бұрын
@@CodeTradingCafe thank you so much. if that's not too much to ask can you help me to code a bot for the binary option. even when doing traditional trading I have an idea, I don't know how to build it.
@zetratrading
@zetratrading Жыл бұрын
Great video! I liked the idea about setting up notifications that you mentioned at the end. I will do it and add to the github repo. Thanks!
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hey, thank you for your support, check this one I used email notification in it: kzbin.info/www/bejne/oHfcm2etbZ2eoNU I hope it helps
@zetratrading
@zetratrading Жыл бұрын
@@CodeTradingCafe Thank you. I will check it out. I was going to use Telegram.
@shortfacts-qy5ke
@shortfacts-qy5ke Жыл бұрын
i have a good idea for you try to add sma 200 with rsi 2 if the price above sma and rsi between 0 t0 10 it means the retracement is finshed and buy signal and if the price less 200 sma and rsi between 90-100 it should be sell signal try it with fibo if the price uptrend and fibo between 161.8 and 127 it should make reracement
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
I like RSI exit strategies, I had good results with it in the past, did you see this video? kzbin.info/www/bejne/oGq7la2pg9upic0
@shortfacts-qy5ke
@shortfacts-qy5ke Жыл бұрын
@@CodeTradingCafe no I will check it really you are good I will check if I can combine some of your strategies together
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Keep up posted :) Good luck!
@crystalwatertherapy
@crystalwatertherapy Жыл бұрын
hi, i have ran this code on daily pay-pal stock but it doesn't generate any signals. which hyper parameters you would sugeust to change? I want it to generate many signals so i can do a meta labeling on it. thanks in advance.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, it's hard to guess without trying. I think the best is to tune each parameter on its own starting from the least selective combination.
@crystalwatertherapy
@crystalwatertherapy Жыл бұрын
@@CodeTradingCafe I'm new to this, would you provide more info. do you mean i change parameters in "generate_signal" def ? i would really appreciate it if you name some parameters to tune. 🗯💯❤
@knk0112
@knk0112 Жыл бұрын
Your videos are a great source of learning Algo-trading. Thanks a lot! Can you please think about making a video on how to back-test Short Strangles and Iron Condors (one of the most famous option strategies in non-directional trading) in Python?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you for your appreciation, I will consider the SS and Iron condors, but this might take a while since I am having a lot of requests.
@joseasanchez200
@joseasanchez200 Жыл бұрын
Do you have a bot for sp500?
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, yes check this video it works on stocks kzbin.info/www/bejne/oGq7la2pg9upic0
@Krisler12
@Krisler12 Жыл бұрын
Please do harmonic patterns. Many people say that this is really work very well. Thank you in advance!
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, thank you for sharing, do you have more details or more specific strategy plan? or anything related to harmonics would work?
@Krisler12
@Krisler12 Жыл бұрын
Hi! Your welcome! Sorry for delay. No, I don't know any strategy exactly just heard a long time ago from KZbin videos and also from their comments that harmonic patterns combined with Fibonacci Retracements levels your are talking about here and also maybe adding some moving averages just works very good. Thank you too!
@rverm1000
@rverm1000 Жыл бұрын
im running into trouble at 10:10 stop loss and take profit is 0. other than that nice video
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, make sure you run the previous cells first check at 09:45
@AliNazemi75
@AliNazemi75 Жыл бұрын
You did great , thank you for sharing Just want to know if we can have these python script ? Do you have any telegram channel that we can these scripts? Thank you so much again for your helpful KZbin channel
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you for your support, you can download the python scripts from the links in the description I usually share the code for every video. Good luck!
@sigmareaver680
@sigmareaver680 Жыл бұрын
12:38 I'm starting to doubt myself here, but since you are calculating tp2, I'm still guessing it's a bug that you're using tp1 twice instead of tp1 and tp2... I have no idea how much this affects your results though...
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Thank you, you were right , tp1 to be replaced by tp2, thanks again for keeping a close eye on the code, I honestly didn't expect that much attention to the details. Hopefully you will stick around :)
@ahmedkzaid5459
@ahmedkzaid5459 9 ай бұрын
hello , i hope you reply to my comment , i find it hard for me to apply this code to trading view , is there's anything im missing or misusing ? please help me out !
@CodeTradingCafe
@CodeTradingCafe 9 ай бұрын
Hi, Trading view uses Pine language, this code runs in Python a completely different environment, the code here as is runs only in python
@ahmedkzaid5459
@ahmedkzaid5459 9 ай бұрын
Thank you so much ❤
@shortfacts-qy5ke
@shortfacts-qy5ke Жыл бұрын
i tried to use your code on gold set it did not give any signals i dont know why !!!!
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, you can change the parameters to fit with the gold price range, this is now tuned for EURUSD.
@joseasanchez200
@joseasanchez200 Жыл бұрын
538 / 3000 Traducción I have a system but I don't know how to make the Python program, I don't have a backtest, could you do it? Here are the rules: For sp500 time frame 4h or 1h depends on the number of signals we want. We wait for the price to break the trend line and correct within the 38.2 and 61.8 of fibonacci, then the buy or sell signal is given by the stochastic when it cuts. The stoploss is the last low or high of the correction and the take profit is the last high or low of the trend. We understand that it changes trend when it exceeds 61.8.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, thank you for sharing your strategy. I am misunderstanding some pieces here, can you please elaborate step by step?
@joseasanchez200
@joseasanchez200 Жыл бұрын
Give me your email and Ill send you It step by step
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, thank you, my email is in the about section of this channel (I don't want to share it in the comments to avoid spam)
@absolute8913
@absolute8913 Жыл бұрын
I love your content, if you could be kind to help us with MT4 as when i put the script it gives me some errors. also, if you have a perfect bot like 70% win rate i would love to give it a try thank you for ur wonderful work
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi, thank you for your support, I am not using MT4 anymore (since over 5 years now), Python is more fun :) Good luck!
@guilhenfsu2
@guilhenfsu2 Жыл бұрын
wrong link of code
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Sorry just updated let me know if it works
@guilhenfsu2
@guilhenfsu2 Жыл бұрын
@@CodeTradingCafe tks ♥
@_AbUser
@_AbUser Жыл бұрын
I always talking to traders "You magic fibonacci is only the half of previous wave +-10 percents, the magic of 38 and 62 levels is only the dispersion of 50 :))))) "
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Actually yes you are right Fibo is just 1/3 of the previous movement, nothing magical about it, and only some patterns fit within the Fibo conditions, I think the reason it's good in not because of any powerful prediction it's just the risk reward ratio involved and you basically use it along the trend.
@georgewiggins5685
@georgewiggins5685 Жыл бұрын
😻 "Promo sm"
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
thanks although I didn't understand !
@H_EL
@H_EL Жыл бұрын
Hello..thanks for your top content. I have a question plz..how to code this price action " 3 or more green bullish candles and then 1 or more red bearish candles, then the price break the high of the red candle or break the high of the last green candle for buy..the oppisite for sell" thank you. I sent you a photo to ur GMAIL Thank you.
@CodeTradingCafe
@CodeTradingCafe Жыл бұрын
Hi thank you for sharing your idea, I will check the email for details, add this strategy to my list, just keep in mind it might be a while before I can make a video about it (the list is kind of long).
@H_EL
@H_EL Жыл бұрын
@@CodeTradingCafe Thank you so much..All the best.
@BillyButcher-X
@BillyButcher-X Жыл бұрын
binary trading strategy you are asking for right
@BillyButcher-X
@BillyButcher-X Жыл бұрын
i made it and back tested on demo account binary trading on quotex and givea around 70-90 percent accuracy depending on days
@H_EL
@H_EL Жыл бұрын
@@BillyButcher-X WOW!!..Thanks so much..sounds good. I need it for forex trading..wanted to code it EA MQL5. But I can try it on binary trading..did you code it?..send me details plz. Thank you & all the best
Automated Price Break Out Detection: Algorithmic Trading In Python
16:34
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
小丑教训坏蛋 #小丑 #天使 #shorts
00:49
好人小丑
Рет қаралды 54 МЛН
Trading Indicator Analysis: CHOCH Indicator Python Implementation
14:10
Trading with Python: Simple Scalping Strategy
13:47
CodeTrading
Рет қаралды 104 М.
How To Build A Trading Bot In Python
18:46
CodeTrading
Рет қаралды 848 М.
Auto-detect Support and Resistance in Python
17:06
Chad Thackray
Рет қаралды 23 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 53 МЛН