Thank you for your appreciation and support! I like to share code and I like the fact that some viewers point out some mistakes or propose improvements, community coding is a big school in my opinion.
But if you inplemented more of the actual strategy, this could be extremely useful. ChoCh is just a tiny element. I would love to go through the complete strategy with you, if you have the time.
love how you dive deep into the intricacies of coding and the change of character indicator. you've got a knack for making complex subjects more digestible. now, while the entire process you laid out is tight, I gotta say, relying too much on historical pivot points and patterns might not always predict future market movements perfectly. sometimes the market just does its own thing, you know? but anyway, your commitment to education is mad impressive. keep it fresh and keep dropping knowledge!
Thanks a lot for your comment! I agree the market is more random than not, that's why I strongly believe that most of the trading is trade management after the trade is opened try to guess if the trade should remain opened or maybe closed early (not easy though). I have been following your videos you did an impressive effort, in my case I code for a living but you managed to do this as a hobby! congrats!
Thank you for sharing, was thinking of doing this same strategy! Im new to programming and been watching all of your videos related to trading the last week. If you want to use the EMA its just to implement it in the backtesting that price should be over it. Will be trying to make this for buy and sell and then implement orders and try this code on a demo, first time doing it!🙏
Hi thank you for your support. Regarding the EMA I have included this filtering many times in previous videos, you might want to use some of the previously coded stuff. Good luck!
Great video, great work. In the end it would be nice to see the results of the strategy, see the backtasting of it. Even if it is necessary to adapt some parameters. And do the backtasting with different parameters. But thanks for sharing the ideas and how to implement it. ❤
Thank you for your support, yes I agree it's better to see to full results, I am avoiding backtesting in the same video because it makes these very long for viewers, maybe I will revisit this in a full backtest later on.
I saw your video is pretty helpful but I do have a question on that about the pivot point if we use in the real market - when we detect the LL or HH, it's already few bars after because we have to set up the window in your code, how we catch up the time without delay to deal with market.
you will always have to wait with a small delay to detect and confirm a pivot there is no way around, but if you are using this on a higher time frame let's say hourly and above, delay is ok because usually the movement/trend takes few hours later on and plenty of time to trade in.
Hello, very clear explanation, thanks a lot. I have one question. Is the function 'detect_structure' valid both for uptrends and for downtrends or only for uptrends?
Hello , this video is one of the best Algorithmic Trading videos I've ever seen in the internet and it was really helpful. I'm a university student and I'm working in this title, I wanted to know is it possible to have the rest of the code for my project???
Great video sir. Could you advice on what to do; I changed all open, high, close and low values in the code you provided to mid_o, mid_h, mid_l, mid_c which are the column names on my dataframe but the whole code returns nothing after I run it. What can I do?
Hi, if you are using this on a different market or different asset you need to modify the numerical parameters as well to fit the values and the volatility of the data you are using.
Hi, to be honest I am not sure which one used in the code/video, but you can be more selective and stick with the body close so you will have less signals but probably better quality, or you can use the extremas (wicks) and get higher number of signals but maybe with more noise as well, it`s up to the trader.
Thank you for your support. For real live trading I would tune my algorithm every 2 weeks using the last 2 or 3 months data to get the best parameters.
The problem I see is that the hh should be detected after a hl or ll, , some examples show that we have consecutive hh or ll , without the ll/hl or lh/hh between
Hi, this was accounted for in the program, it's the order condition added to ensure that highs and lows are detected only in a certain order. I hope it clarifies a bit this point, but if I missed something (which is possible) let me know. Thank you for sharing your ideas.
Thanks lot for the great algo in this platform. I have a query, How can I take the closing price instead of HH and LL. because sometime wicks are too long and confusing.
Hi, thank you for your support! regarding your question just check the pivot detection function where we compute the fractals and instead of high and low values for the pivot tests just use the max(open, close) or the min(open,close), so the maximum among open and close, and minimum among these 2 depending if you are computing the pivot high or pivot low. I hope this helps.
I'm still new to AI trading, so I apologize if this idea is misguided. Have you thought about using transformer based models to generate buy and sell signals? I'm not exactly sure what indicators one would include, but... I have a 4090, so I have enough VRAM to perhaps train a 1-2 billion parameter model, depending on the training technique used.
Hi, thank you for sharing. Actually the idea is interesting I assume just like LLMs are guessing the next word in a sequence maybe the same principle can be applied to trading, but transformers need a lot of data to perform I am not sure in trading this might work, but there is one way to find out.
Dravax box has been requested before, I think it's very similar to the break out strategy, in my opinion you can tune the code I published for channel break out for Dravax Box detection.
Thank you for your support, the best way to define lim1 is to check the asset charts and plot a manual example then measure the typical distances including lim1, so in brief I do this manually as a start then I fine tune it in python while testing.
Hi, good question, actually there is a sample of how to link from Python to Oanda for example: ruclips.net/video/WcfKaZL4vpA/видео.html The idea is to have a fully automated bot.
hello sir thanks for videos, you haven't been posting a video that makes a price prediction with artificial intelligence recently. what is the reason for this? Or did you see that making predictions with artificial intelligence is not good enough? I've been working on this issue for about two months and it still hasn't performed well that meets my expectations. What are your views on this topic?
Hi, thank you for your support. You are right it has been a while I haven't published a ML/AI video, the reason is that they don't work well for this type of problems, the data has too much noise for ML, I tried facebook Prophet time series forecasting recently in a video and still I wasn't impressed.
Hi Guy Thank a lot for your sharing. And I looking for another episode such as supertrend strategy and Can you share the idea how to code MT5 live trading.
Thank you for your support! I honestly quit using mql5 I find Python more powerful, but there is a way to link python to mt4/5 hopefully I will get the chance to make a video on this, in the future.
Can you, find Trend detection without using any price lagging indicators? if so, could you please make a video on price action and multi time frame trading is more important for many viewers
Hi, basically everything is lagging because everything relies on past data or data that we already see. price action is technically in the same class as well, but sometimes for some reason these indicators still work!
@@CodeTradingCafe it seems, price is the real time data which we can rely on mostly, basing on this any indicator will be made, so in my opinion price action is the leading, right? any how thanks for your response to my basic question.
I agree, actually do you have specific price action strategies in mind? I already have some videos on break outs and patterns change of character, you might find this interesting, if you have other price action indicators/approaches in mind please let me know.
Awesome, thank you for your support! I hope they will be of use for you. Good luck. Actually you don't need to buy all of them if you already know Python, check the content see what is good for you, skip the basics if you already have experience coding.
I am not sure if you are still active on this channel. If the HL has been broken during descending impulse, we can check the Fibonacci levels to see if it is the right entry or not. If the price broke below and already crossed 61.8% Fib level, it can be a wrong trade.
Hi, thank you for sharing, yes I am still following up a bit. Good point I actually have another vid on the Fibonacci entry levels we can combine both videos/codes I guess.
I personally prefer python as I use it in my daily job and there is a wealth of numerical libraries for all kind of algos including machine learning and deep learning, I find Python more powerful.
Thanks for the video… learned a lot of things from your videos and applying in my real life… Just a random question: do you run trading bot? Just curious since you’re good at this thought you might be running few bots for yourself
I do run bots in some market conditions, so not all the time nor the same bot its market dependent. That being said don't expect a return more than 2% per month if you count on fully automated strategy, it's very hard to have more than that, and this is in the best case scenario, so ... no it doesn't buy a private jet yet :) (But this is only my experience, maybe somewhere out there there are some algorithmic traders who are making more, and maybe not). I hope this answer helps a bit, I really don't like to advertise false info and trading didn't make me rich, but it did pay some of my holidays.
Hi, you will need to install Python and get familiar with the coding environment first. I you haven't done any coding it might be a bit challenging to jump straight into this type of algorithms.
Great video but i don't get one thing, when you look for EMA signals you use `range(row-backcandles, row+1)` won't this lead you to observe the candle after the current one? if we use 15 as row (first loop) we have `range(0, 16)` so it will include all the candles with index between 0 and 15 (16 candles but the current is the 15th). no? What am i missing? lol🤣
Hi, no there is no look ahead bias. In python the right or upper limit is excluded so range(a, b+1) actually brings values between a and b included (b+1 excluded). I hope this answer helps.
@@CodeTradingCafe my bad sorry, i noticed some hours after commenting... usually i code in golang, and i'm reproducing this project. I edited your CHOCH pattern1 because it had lowPrice3 > lowPrice2 and higPrice3 < highPrice2(this seems to not respect the picture assuming we looked the same highs and lows). I assumed you used the closing price of every candle. Pythone makes it easier but in golang computing thousends of candles take just few seconds :D
I was wondering if you could help out with some output. In a BOS pattern I would like to have horizontal lines from each pivot high to the right ( in an uptrend), so we can visualize the break of structure better when a higher high appears. Same for the low, during a downward bos pattern, there should be horizontal lines to the right (untill price touches). I couldnt figure out how to do this, so any help is welcome. I have added the following line to attempt to create the choch line, indicating the actual character change, which seems to work ok. dataframe.loc[start_idx:end_idx, 'structure_change_level'] = detected_price_level
I like this level of detail. So many other channels are shy of showing code.
Thank you for your appreciation and support! I like to share code and I like the fact that some viewers point out some mistakes or propose improvements, community coding is a big school in my opinion.
when the code works as intended but the signal is false, it shows your integrity. keep up the good work!
Thank you! I needed a comment like yours (sometimes expectations are so high, above reality).
@@CodeTradingCafeman, you've motivated me, I'm a dev trying to make it trading in my spare time, and want to automate as much as possible
But if you inplemented more of the actual strategy, this could be extremely useful. ChoCh is just a tiny element. I would love to go through the complete strategy with you, if you have the time.
love how you dive deep into the intricacies of coding and the change of character indicator.
you've got a knack for making complex subjects more digestible.
now, while the entire process you laid out is tight, I gotta say, relying too much on historical pivot points and patterns might not always predict future market movements perfectly.
sometimes the market just does its own thing, you know?
but anyway, your commitment to education is mad impressive.
keep it fresh and keep dropping knowledge!
Thanks a lot for your comment! I agree the market is more random than not, that's why I strongly believe that most of the trading is trade management after the trade is opened try to guess if the trade should remain opened or maybe closed early (not easy though). I have been following your videos you did an impressive effort, in my case I code for a living but you managed to do this as a hobby! congrats!
Finally found a channel which was much needed for seeking info. about Algo trading.
Deep respect to you Sir❤
love from India
Welcome aboard! Thank you for your support and appreciation.
Thank you so much... Truly impressed with your explanation and how you could represent a complex problem and have it coded seamlessly.
Glad this is helpful, thank you for your support!
Love this channel... Code the Fractal Breakout has been a great way to learn about the markets move...
Thank you for your support! always glad to know these vids are appreciated.
Absolutely love this advanced video! These are the techniques needed for any sort of trading algo. 🔥
Glad you liked it! Thanks a lot for your support.
New subscriber. Exactly what I was looking for. More SMC and forex strats and vids please.
Welcome aboard! and thank you for your support.
Love it great video! Had a different approach to automating ChoChs and it is really interesting to see how you implemented it. Thx for sharing ^^
Thank you for your support! I really appreciate it!
Whats your different approach ?
i started to learn coding because of you !
I am bad influence :) Thank you for your support and good luck!
Thank you for sharing, was thinking of doing this same strategy! Im new to programming and been watching all of your videos related to trading the last week. If you want to use the EMA its just to implement it in the backtesting that price should be over it. Will be trying to make this for buy and sell and then implement orders and try this code on a demo, first time doing it!🙏
Hi thank you for your support. Regarding the EMA I have included this filtering many times in previous videos, you might want to use some of the previously coded stuff. Good luck!
Great video, great work.
In the end it would be nice to see the results of the strategy, see the backtasting of it.
Even if it is necessary to adapt some parameters. And do the backtasting with different parameters.
But thanks for sharing the ideas and how to implement it. ❤
Thank you for your support, yes I agree it's better to see to full results, I am avoiding backtesting in the same video because it makes these very long for viewers, maybe I will revisit this in a full backtest later on.
@@CodeTradingCafe This would be great.
Maybe one video for backtesting, and than just the strategy which could be used in the backtesting. :)
I agree 2 parts is good.
Thanks. It is useful for stock scanners. But I need to check the RSI and PPO signals also.
It's possible to compute RSI using pandas_ta then you can include a condition.
I appreciate many of your videos that I have watched. Can you consider making one on detecting order blocks from smart money concepts?
Hi, it's on my to do list, but the list is long so it might be couple of months! sorry
@@CodeTradingCafe Don't be sorry. I will eagerly await whenever you post order blocks video.
Thank you for sharing. I look forward to testing this code.
Thank you for your comment! Good luck for the code!
I saw your video is pretty helpful but I do have a question on that about the pivot point if we use in the real market - when we detect the LL or HH, it's already few bars after because we have to set up the window in your code, how we catch up the time without delay to deal with market.
you will always have to wait with a small delay to detect and confirm a pivot there is no way around, but if you are using this on a higher time frame let's say hourly and above, delay is ok because usually the movement/trend takes few hours later on and plenty of time to trade in.
Hello, very clear explanation, thanks a lot. I have one question. Is the function 'detect_structure' valid both for uptrends and for downtrends or only for uptrends?
Thank you, yes the function is valid for both up and down trends.
Hello , this video is one of the best Algorithmic Trading videos I've ever seen in the internet and it was really helpful. I'm a university student and I'm working in this title, I wanted to know is it possible to have the rest of the code for my project???
Hi, thank you for your support, the code is available from the link in the description. Good luck!
Great video sir. Could you advice on what to do; I changed all open, high, close and low values in the code you provided to mid_o, mid_h, mid_l, mid_c which are the column names on my dataframe but the whole code returns nothing after I run it. What can I do?
Hi, if you are using this on a different market or different asset you need to modify the numerical parameters as well to fit the values and the volatility of the data you are using.
@@CodeTradingCafe okay. I’m using it in a GBPUSD 5m dataframe. Please how do I do that?
basically the easiest is trial and error, try different values (whatever makes sense from your trading experience).
@@CodeTradingCafe okay thank you.
Great video. One question: where do you use the new column "EMASignal"? I think it is being calculated but never used afterwards?
Hi thank you, I guess I didn't use it, totally forgot that it wasn't needed. Thanks for pointing this out.
apologies I could be wrong on this - but dont you need a body close for a choch, rather than a wick ?
Hi, to be honest I am not sure which one used in the code/video, but you can be more selective and stick with the body close so you will have less signals but probably better quality, or you can use the extremas (wicks) and get higher number of signals but maybe with more noise as well, it`s up to the trader.
Wow. Nice code. Thank you.
You're welcome! thank you!
Thanks lot for the great algo
What limits would you put on Bitcoin?
Thank you for your support. For real live trading I would tune my algorithm every 2 weeks using the last 2 or 3 months data to get the best parameters.
Nice work. Thank you for sharing.😃
Thank you for your support!
The problem I see is that the hh should be detected after a hl or ll, , some examples show that we have consecutive hh or ll , without the ll/hl or lh/hh between
Hi, this was accounted for in the program, it's the order condition added to ensure that highs and lows are detected only in a certain order. I hope it clarifies a bit this point, but if I missed something (which is possible) let me know. Thank you for sharing your ideas.
Brilliant! Can't this be implemented in realtime with realtime data?
Hi thank you, yes we can implement it, I am just thinking of a full strategy first, it will be in a video one day.
Thanks lot for the great algo in this platform. I have a query, How can I take the closing price instead of HH and LL. because sometime wicks are too long and confusing.
Hi, thank you for your support! regarding your question just check the pivot detection function where we compute the fractals and instead of high and low values for the pivot tests just use the max(open, close) or the min(open,close), so the maximum among open and close, and minimum among these 2 depending if you are computing the pivot high or pivot low. I hope this helps.
I'm still new to AI trading, so I apologize if this idea is misguided. Have you thought about using transformer based models to generate buy and sell signals? I'm not exactly sure what indicators one would include, but... I have a 4090, so I have enough VRAM to perhaps train a 1-2 billion parameter model, depending on the training technique used.
Hi, thank you for sharing. Actually the idea is interesting I assume just like LLMs are guessing the next word in a sequence maybe the same principle can be applied to trading, but transformers need a lot of data to perform I am not sure in trading this might work, but there is one way to find out.
I was wondering if you can share some idea on bar replay in python. would be a great help thanks.
To be honest I haven't done it in Python yet, I think tradingview specific. I will have a look into it.
Hi
Can you code the darvax box strategy 8n python? Thanks
Dravax box has been requested before, I think it's very similar to the break out strategy, in my opinion you can tune the code I published for channel break out for Dravax Box detection.
You're Rock!; thanks 😊
Thanks a lot for your support.
Please shows us how to detect test of structure in a form of a double top/bottom.
Thank you for sharing it's already on my list, will get something together.
@@CodeTradingCafe Thank you.
Parabéns, muito legal!
Obrigado :) thank you for your support
You are giving great information, could please make a live trading video price action, not using any price lagging indicators?
Hi, Great suggestion! do you have any reference? video? or any specific strategy in mind?
Awesome work, thanks for sharing
Thank you for your support, I am glad you liked this one.
How can we set the lim1 value in cryptocurrencies? Your shares are very valuable. thank you for all the information
Thank you for your support, the best way to define lim1 is to check the asset charts and plot a manual example then measure the typical distances including lim1, so in brief I do this manually as a start then I fine tune it in python while testing.
Is there any video related how to setup a script like any in your channel with a broker?
Hi, good question, actually there is a sample of how to link from Python to Oanda for example: ruclips.net/video/WcfKaZL4vpA/видео.html
The idea is to have a fully automated bot.
love your content
Thank you for your support!
Very helpful!
Glad it was helpful! Thank you for your support.
Great Job Thank you too much.
Glad it was helpful! and thank you for your support.
hello sir thanks for videos, you haven't been posting a video that makes a price prediction with artificial intelligence recently. what is the reason for this? Or did you see that making predictions with artificial intelligence is not good enough? I've been working on this issue for about two months and it still hasn't performed well that meets my expectations. What are your views on this topic?
Hi, thank you for your support. You are right it has been a while I haven't published a ML/AI video, the reason is that they don't work well for this type of problems, the data has too much noise for ML, I tried facebook Prophet time series forecasting recently in a video and still I wasn't impressed.
Hi Guy Thank a lot for your sharing. And I looking for another episode such as supertrend strategy and Can you share the idea how to code MT5 live trading.
Thank you for your support! I honestly quit using mql5 I find Python more powerful, but there is a way to link python to mt4/5 hopefully I will get the chance to make a video on this, in the future.
@@CodeTradingCafe That I mean how to python code interface MT5 with live data.Thank again I'm waiting for new VDO.
would be useful if you could plot CHoC symbol and EMA on Chart and add code please?
Hi, the code is available from the link in the description.
what is the profitability? Do you have any stats? thank you
Hi, I don't recap testing this in a full trading strategy, But... this might be a good idea for a video.
Can you, find Trend detection without using any price lagging indicators? if so, could you please make a video on price action and multi time frame trading is more important for many viewers
Hi, basically everything is lagging because everything relies on past data or data that we already see. price action is technically in the same class as well, but sometimes for some reason these indicators still work!
@@CodeTradingCafe it seems, price is the real time data which we can rely on mostly, basing on this any indicator will be made, so in my opinion price action is the leading, right? any how thanks for your response to my basic question.
I agree, actually do you have specific price action strategies in mind? I already have some videos on break outs and patterns change of character, you might find this interesting, if you have other price action indicators/approaches in mind please let me know.
Can you make a playlist on algo trading step by step with building one profitable strategy from scratch
Hi, I have shared many trading indicators so far, some of them are profitable, but you need to combine them with a proper trade management approach.
I will purchase all your courses in udemy :)
Awesome, thank you for your support! I hope they will be of use for you. Good luck. Actually you don't need to buy all of them if you already know Python, check the content see what is good for you, skip the basics if you already have experience coding.
Jai Guruji
Thank you!
How did you get database? I'm trying to update it. But it doesn't work.
Hi, I get my data from Dukascopy.
Can you share the link. Is it an API?@@CodeTradingCafe
No not an API just google it's a Broker Bank and they provide historical data.
I am not sure if you are still active on this channel. If the HL has been broken during descending impulse, we can check the Fibonacci levels to see if it is the right entry or not. If the price broke below and already crossed 61.8% Fib level, it can be a wrong trade.
Hi, thank you for sharing, yes I am still following up a bit. Good point I actually have another vid on the Fibonacci entry levels we can combine both videos/codes I guess.
@@CodeTradingCafe Thank you for the reply. I sent you an email to you. Please check and let me know.
@@CodeTradingCafelooking forward to the combined video of you've got time to do it. Thank you for your effort anyway😊❤
Where can i get dataset on GBPUSD
Try Dukascopy they have a wide database
can you explain how to isntall, i ran the code online but nothing came up
Hi, you need to install Python and then run the code using jupyter notebook.
very helpful
Glad it helped, good luck and thank you for the comment.
Why can't you make pine script in trading view
I personally prefer python as I use it in my daily job and there is a wealth of numerical libraries for all kind of algos including machine learning and deep learning, I find Python more powerful.
You can't use pine script for automation
Thanks for the video… learned a lot of things from your videos and applying in my real life…
Just a random question: do you run trading bot? Just curious since you’re good at this thought you might be running few bots for yourself
I do run bots in some market conditions, so not all the time nor the same bot its market dependent. That being said don't expect a return more than 2% per month if you count on fully automated strategy, it's very hard to have more than that, and this is in the best case scenario, so ... no it doesn't buy a private jet yet :) (But this is only my experience, maybe somewhere out there there are some algorithmic traders who are making more, and maybe not). I hope this answer helps a bit, I really don't like to advertise false info and trading didn't make me rich, but it did pay some of my holidays.
im newbie on channel, how can i install it and to work on live market.. thanks
Hi, you will need to install Python and get familiar with the coding environment first. I you haven't done any coding it might be a bit challenging to jump straight into this type of algorithms.
Great video but i don't get one thing, when you look for EMA signals you use `range(row-backcandles, row+1)` won't this lead you to observe the candle after the current one? if we use 15 as row (first loop) we have `range(0, 16)` so it will include all the candles with index between 0 and 15 (16 candles but the current is the 15th). no?
What am i missing? lol🤣
Hi, no there is no look ahead bias. In python the right or upper limit is excluded so range(a, b+1) actually brings values between a and b included (b+1 excluded). I hope this answer helps.
@@CodeTradingCafe my bad sorry, i noticed some hours after commenting... usually i code in golang, and i'm reproducing this project. I edited your CHOCH pattern1 because it had lowPrice3 > lowPrice2 and higPrice3 < highPrice2(this seems to not respect the picture assuming we looked the same highs and lows). I assumed you used the closing price of every candle.
Pythone makes it easier but in golang computing thousends of candles take just few seconds :D
Thanks for the code.
Thank you for your support!
Thank you.
Thank you for your appreciation! Good luck!
Hello, are you available for hire on small projects ?
Hello, yes, please contact me on my email on the about page of this channel.
risk management techniques video?
Hi, only one video showing this briefly so far, I hope it helps: ruclips.net/video/Ugp3peGPNpU/видео.html
im sorry what IDE are you programming in here?
Hi, VScode for this one.
I was wondering if you could help out with some output.
In a BOS pattern I would like to have horizontal lines from each pivot high to the right ( in an uptrend), so we can visualize the break of structure better when a higher high appears.
Same for the low, during a downward bos pattern, there should be horizontal lines to the right (untill price touches).
I couldnt figure out how to do this, so any help is welcome.
I have added the following line to attempt to create the choch line, indicating the actual character change, which seems to work ok.
dataframe.loc[start_idx:end_idx, 'structure_change_level'] = detected_price_level
Check the end of this video (last section I think): ruclips.net/video/aJ8Og-iLaas/видео.html
can you make a break of structure indicator video
Yes it's on my list, do you have a specific pattern in mind? a reference video perhaps?
@@CodeTradingCafe Hi yes, ruclips.net/video/fPSQ_NnmqWI/видео.html
@@CodeTradingCafe Hi yes, ruclips.net/video/fPSQ_NnmqWI/видео.html
@@CodeTradingCafe Hi yes, ruclips.net/video/fPSQ_NnmqWI/видео.html
@@CodeTradingCafe should I email the reference video? my responses dont seem to be showing up on the replies
which font are you using
Hi, you mean in the code ? or in the presentation part?
@@CodeTradingCafe yes the python code part
i cant download the code
It should work from google drive, good luck!
it works thank you!@@CodeTradingCafe
do you use github??
Hi, I do use github but these codes are not on my git repo.
ty
Thank you for your support!
Can i contact you sir can you make me my own ea bot for forex and gold
Hello, sure, my email is available on the about page of this channel.