The discussion on the bullish and bearish seamed to have been mixed up at 8:00. The first part of the for loop seems to be referring to the DOWN candle and the else condition seemed to be referring to the UP candle.
Don't you like the vectorized pandas and the stockstats module? Stockstats saves me a LOT of time. You can calculate differences between the closing prices from different candles rather easily with it. Code gets very short, but usualy there is an annoying step to remove the intermediate rows used to build the signal and clean up the df. Congratz on the channel, this is so useful.
Hello, no actually it's how I wanted to keep it, so in case you need to modify it instead of 0 it will be something e-5 let's say a difference of 5e-5 for example depending on how selective you want to be in the filtering
Great video, I got a few of your Udemy classes, very good with lots of resources. Interesting to see the stats on the engulfing candles, I use them in my discretionary trading as a warning sign but I want to see a large candle that engulfs a few days to consider it a true signal, for this to happen you need a basing pattern lead up. (indecision) They don't come often but when they do they are powerful.
Hi, thank you for your support, glad the courses were helpful. I agree engulfing candles can be used in different ways entry or exit signals, actually there are also some variations where 2 candles can engulf the previous for example and so on, maybe it's good to list all of these variation in a video (I will check this out, might be interesting to see, stats in between)
@@CodeTradingCafe Yes, that sounds like an interesting idea, then maybe a follow-up testing added signal smoothers, that try to eliminate the false triggers. Yet maybe you did that already and I just have not seen it yet.
Great tutorial MANY THANKS FOR THIS ONE! Where do u get your CSV market data from? Yfinance doesn't seem to have the same field formatting as your CSV in this video
Thank you for your support 😊 yfinance and you adapt it through pandas or you can create a dukascopy account (you have more control over data format there). Good luck!
Hi, the closest I have to price action are the following: ruclips.net/video/oyuyeYi_7rw/видео.html ruclips.net/video/Hpqptc5mWW8/видео.html ruclips.net/video/LNQUvN7_NUQ/видео.html If you have a specific strategy just send me the reference I will look into it. Good luck!
I am new to the whole programming world. I was wondering how can I integrate my codes in my meta trader or trading view to give me alert whenever the criteria are met.
Hey meta trader is kind of easy based on c++ but you will have to invest couple of months learning the language (mql5) it's worth it if you already have a winning strategy.
Please make a video on combination of price action and t.i signals powered by lstm to make trade better decisions. You are doing an amazing work with these tutorials 👏 🙌
Thank you for your comment. I tried lstm models/combinations in many different ways, surprisingly results were very bad and completely useless (that's why I didn't do a video). Sometimes simpler models yield better results.
@@CodeTradingCafe Bro.... as per you Experience... Which Strategy whould be more Promising for real life Trading Buy-Sell signals ??? 1) Via ML models like XGboost, KNN , & all 2) Via Neural Networks like LSTM, FBProphet, and all 3) Just using Doji's, Engulfings.... & Slopes of different Indicators & Support Resistance level &, This strategies will be mostly effective in Intraday or Swing Trading ??? & that too in EQUITY or CURRENCY/CRYPTO ??? If you knew this answers... Please let me know bro.... I'm really getting Confused in all these 🤕🤕 It would be Great for me.... as you have alot of Re-enforcement learnings from Past Years...& I'm currently learning this stuff So...I'm curious about it. Hope you'll guide....me about this bro🙂
@@wingsoftechnology5302 Hi, out of experience the simpler the better, Machine learning doesn't work for this type of data unfortunately. Best prediction are based on price movement and candles patterns with support and resistance levels in mind. Hope this helps
hey man great vid as always!, I'm trying develop a code where i backtest trades with the engulfing candle stick pattern off a significant support/resistance level. could you do a video maybe trying this out yourself ? I'm struggling with defining what a significant level would be ?
Hi thanks for your comment. Actually yes I will check how to numerically define a support/resistance level, I might need some time to make the video ... The list is getting bigger
How about statistics on lower time frame like 15 minutes, 30 minutes, 1 hour etc for an year. Also if you are really into bot technologies have you tried coding MT4/MT5 bots using mql.
Lower time frames are more noisy in my opinion it will be more difficult to assess, however might be worth a try to see. I have coded on mql for 8 years moved to Python because it gives access to machine learning and neural networks methods. The only advantage of mql is an easier integrated backtesting (but also tricky and comes with its traps). In brief haven't found any fully automated system (mql) that would provide more than 8 percent profit per year, can push this up to 15percent with increased risk, in my opinion ain't worth it.
@@CodeTradingCafe Makes total sense IMO. MT5 can bring a lot of benefit compare to MT4, but still needs some kind of add-ons for it to work properly. Meanwhile there is a one interesting discord group you can join w.r.t algo trading stuff. discord.gg/rDWUJBbg.If you have your pls share that one too.
@@CodeTradingCafe Thanks for that hint , I had been on circle of doom lately to choose between mql and python, but my instinct told me to choose python which I saw it got more freedom on analyzing trading ideas . what do you think should I continue this path aka trading with python.
@@saidfehers8607 I would say go for both, python first because even if your bot is not perfect you would have one more language to add on your CV... who knows might be useful and python is widely used now. Then go for mql it is not much of a difference from the algorithmic point of view, loops and functions, variables and ... So after python I think it will fast with mql. Good luck
@@ahmetenesozturk1902 well at the moment it's the best indicator I found if you combine it with support and resistance levels, I have to try it on lower time frames and see what it gives
I’m a beginner coder and getting zero signals for my Revsignal1 function. 🙈 I’m using 5min data going back to 2020. I’ve made no amendments to your code except to read_csv my own 😬 I’m also getting a runtime warning in the line where it should output my percentage. “invalid value encountered in long_scalars.”
Hi the parameters have to be adapted to your timeframe and the currency you are testing. It might be challenging if you have no programming background, you need at least some basic knowledge. It might take some time but it's worth it.
@@CodeTradingCafe My 30pips bodydiffmin exclusion was too much for my timeframe. But my stats are very low. For my 5 minute timeframe, I now exclude 3pips instead of your original 30pips - giving me about 540 bearish and 540 bullish signals. With even a 15pip target 5 bars ahead, I’m getting a success rate of 10% 🥺😅. I’m gonna take a closer look at my data and maybe even re-download it for good measure. I’ll also play around with different timeframes.
@@piwetshombe4684 lower timeframes are harder to trade in algotrading, the easiest is start daily, then decrease 4hours, 1 hour etc... See where you can get, and optimization is mandatory for each timeframe
Hi, thank you CHOCH is a good idea I will add it to my list, in the meantime check this video it provides an idea on the methodology ruclips.net/video/Mxk8PP3vbuA/видео.html
@@CodeTradingCafe Hi Thanks for reply, It worked out... I was curious, If we change only the "Engulfing Candle Pattern" code Block with other Candle pattern block code and rest all the same, will it give the accuracy for that pattern?
I personally wouldn't advise fully automated trading, I prefer algorithmic trading where if the program detects an opportunity it will send an email or a message somehow and it's up to the trader to take the final decision. I believe you have better chances of winning this way.
Hi, thanks, fees might vary depending on broker and type of account. My purpose was to compare different technical methods to see which is best. Exit points are added in future videos when possible but it's the most difficult to guess.
Hi, not really ML is not that powerful for such problems unfortunately or I haven't discovered the way yet... Check this video ruclips.net/video/q_0rvwPbIqg/видео.html Next I will try neural networks
Hello my friend, thank you for providing the excellent information, but can you make a fully automated trading bot for the platform so that we can benefit from your experience, and thank you
It's in the process, however my main target here is provide educational content first, so everyone is able to understand what is the bot doing rather than simply running programs like a blackbox. Stay tuned more stuff are coming, and thank you for your comment.
You need to analyze your strategies by backtesting them, not by doing highschool pandas exercises. Backtesting means consuming signals, entering long and short, adding spread, slippage and commissions, calculating PNL and sharpe ratios. Otherwise it's just a waste of everyone's time.
Unfortunately I don't agree on starting with the details, top down research is a well established approach, if skipping commissions doesn't provide a winning strategy then you already know it's better to move on to a different one without wasting time on commission, spread and slippage. According to your experience what are the odds slippage would affect a daily timeframe trading?
The discussion on the bullish and bearish seamed to have been mixed up at 8:00. The first part of the for loop seems to be referring to the DOWN candle and the else condition seemed to be referring to the UP candle.
Hi, thank you for the heads up, it's very possible I get things mixed like this sometimes.
Don't you like the vectorized pandas and the stockstats module? Stockstats saves me a LOT of time. You can calculate differences between the closing prices from different candles rather easily with it. Code gets very short, but usualy there is an annoying step to remove the intermediate rows used to build the signal and clean up the df. Congratz on the channel, this is so useful.
Thank you for your comment I will check stockstats out!
Thank you for the video, but at 8:45, "+0e-5" equals to 0, is this a typo?
Did you mean "+1e-5", which equals to 0.00001?
Hello, no actually it's how I wanted to keep it, so in case you need to modify it instead of 0 it will be something e-5 let's say a difference of 5e-5 for example depending on how selective you want to be in the filtering
@@CodeTradingCafe Got it, thanks! : )
@@jinghaoliu good luck 🙂
I really liked the random approach.
It's an old video I should review the content and maybe expand with some Monte-Carlo
Great video, I got a few of your Udemy classes, very good with lots of resources. Interesting to see the stats on the engulfing candles, I use them in my discretionary trading as a warning sign but I want to see a large candle that engulfs a few days to consider it a true signal, for this to happen you need a basing pattern lead up. (indecision) They don't come often but when they do they are powerful.
Hi, thank you for your support, glad the courses were helpful. I agree engulfing candles can be used in different ways entry or exit signals, actually there are also some variations where 2 candles can engulf the previous for example and so on, maybe it's good to list all of these variation in a video (I will check this out, might be interesting to see, stats in between)
@@CodeTradingCafe Yes, that sounds like an interesting idea, then maybe a follow-up testing added signal smoothers, that try to eliminate the false triggers. Yet maybe you did that already and I just have not seen it yet.
Great tutorial MANY THANKS FOR THIS ONE! Where do u get your CSV market data from? Yfinance doesn't seem to have the same field formatting as your CSV in this video
Thank you for your support 😊 yfinance and you adapt it through pandas or you can create a dukascopy account (you have more control over data format there). Good luck!
@@CodeTradingCafe amazing. Will stay tuned for more Tuts. I love your content bro 👊🏼
Do you have anything on a program something for price action with volume aka volume price analysis
Hi, the closest I have to price action are the following:
ruclips.net/video/oyuyeYi_7rw/видео.html
ruclips.net/video/Hpqptc5mWW8/видео.html
ruclips.net/video/LNQUvN7_NUQ/видео.html
If you have a specific strategy just send me the reference I will look into it. Good luck!
Excellent work and excellent videos. Thank you!
Glad you like them! Thank you so much for your support!
I am new to the whole programming world. I was wondering how can I integrate my codes in my meta trader or trading view to give me alert whenever the criteria are met.
Hey meta trader is kind of easy based on c++ but you will have to invest couple of months learning the language (mql5) it's worth it if you already have a winning strategy.
Well presented
Thank you for your comment!
Please make a video on combination of price action and t.i
signals powered by lstm to make trade better decisions. You are doing an amazing work with these tutorials 👏 🙌
Thank you for your comment. I tried lstm models/combinations in many different ways, surprisingly results were very bad and completely useless (that's why I didn't do a video). Sometimes simpler models yield better results.
@@CodeTradingCafe Bro.... as per you Experience... Which Strategy whould be more Promising for real life Trading Buy-Sell signals ???
1) Via ML models like XGboost, KNN , & all
2) Via Neural Networks like LSTM, FBProphet, and all
3) Just using Doji's, Engulfings.... & Slopes of different Indicators & Support Resistance level
&,
This strategies will be mostly effective in Intraday or Swing Trading ???
& that too in EQUITY or CURRENCY/CRYPTO ???
If you knew this answers... Please let me know bro.... I'm really getting Confused in all these 🤕🤕
It would be Great for me.... as you have alot of Re-enforcement learnings from Past Years...& I'm currently learning this stuff
So...I'm curious about it.
Hope you'll guide....me about this bro🙂
@@wingsoftechnology5302 Hi, out of experience the simpler the better, Machine learning doesn't work for this type of data unfortunately. Best prediction are based on price movement and candles patterns with support and resistance levels in mind.
Hope this helps
@@CodeTradingCafe Okay... Thanks... I'll Work accordingly
hey man great vid as always!, I'm trying develop a code where i backtest trades with the engulfing candle stick pattern off a significant support/resistance level. could you do a video maybe trying this out yourself ? I'm struggling with defining what a significant level would be ?
Hi thanks for your comment. Actually yes I will check how to numerically define a support/resistance level, I might need some time to make the video ... The list is getting bigger
@@CodeTradingCafe great looking forward to your upcoming content mate.
Ossom... how to connected this to tradeingview demo?
Tradingview I don't think it is possible, but other platforms might be easier... Binance oanda...
@@CodeTradingCafe tradestation? Can I copy the code to their bot system?
I don't know, I am not familiar with their platform
... but dig around I am sure there is something in their documentation or on the internet.
@@CodeTradingCafe sorry/ last q. how i chenge the code to check a future like NQ100 or ES500?
How about statistics on lower time frame like 15 minutes, 30 minutes, 1 hour etc for an year. Also if you are really into bot technologies have you tried coding MT4/MT5 bots using mql.
Lower time frames are more noisy in my opinion it will be more difficult to assess, however might be worth a try to see.
I have coded on mql for 8 years moved to Python because it gives access to machine learning and neural networks methods. The only advantage of mql is an easier integrated backtesting (but also tricky and comes with its traps). In brief haven't found any fully automated system (mql) that would provide more than 8 percent profit per year, can push this up to 15percent with increased risk, in my opinion ain't worth it.
@@CodeTradingCafe Makes total sense IMO. MT5 can bring a lot of benefit compare to MT4, but still needs some kind of add-ons for it to work properly. Meanwhile there is a one interesting discord group you can join w.r.t algo trading stuff. discord.gg/rDWUJBbg.If you have your pls share that one too.
@@CodeTradingCafe Thanks for that hint , I had been on circle of doom lately to choose between mql and python, but my instinct told me to choose python which I saw it got more freedom on analyzing trading ideas . what do you think should I continue this path aka trading with python.
@@saidfehers8607 I would say go for both, python first because even if your bot is not perfect you would have one more language to add on your CV... who knows might be useful and python is widely used now. Then go for mql it is not much of a difference from the algorithmic point of view, loops and functions, variables and ... So after python I think it will fast with mql.
Good luck
Excellent work. Request you to please try scalping using python and backtesting that. Thanks
Hi, thank you for your comment, yes scalping is on the list... a bit more difficult though :)
Thank you my friend for the quick response to a question and I hope that the new bot will work for the binance platform
Good luck to you too
Hey may we talk about winrate
Yes sure... What about it exactly?
@@CodeTradingCafe is engulfing cdl based trade worth ?
@@ahmetenesozturk1902 well at the moment it's the best indicator I found if you combine it with support and resistance levels, I have to try it on lower time frames and see what it gives
I’m a beginner coder and getting zero signals for my Revsignal1 function. 🙈
I’m using 5min data going back to 2020. I’ve made no amendments to your code except to read_csv my own 😬
I’m also getting a runtime warning in the line where it should output my percentage. “invalid value encountered in long_scalars.”
Hi the parameters have to be adapted to your timeframe and the currency you are testing. It might be challenging if you have no programming background, you need at least some basic knowledge. It might take some time but it's worth it.
@@CodeTradingCafe The currency pair is EURUSD, so I think the pip values should be fine.
I’ll have to check what other parameters need adjusting.
Good luck!
@@CodeTradingCafe My 30pips bodydiffmin exclusion was too much for my timeframe.
But my stats are very low.
For my 5 minute timeframe, I now exclude 3pips instead of your original 30pips - giving me about 540 bearish and 540 bullish signals.
With even a 15pip target 5 bars ahead, I’m getting a success rate of 10% 🥺😅.
I’m gonna take a closer look at my data and maybe even re-download it for good measure. I’ll also play around with different timeframes.
@@piwetshombe4684 lower timeframes are harder to trade in algotrading, the easiest is start daily, then decrease 4hours, 1 hour etc... See where you can get, and optimization is mandatory for each timeframe
🔥nice, Can you do a video for choch startegy too?
Hi, thank you CHOCH is a good idea I will add it to my list, in the meantime check this video it provides an idea on the methodology ruclips.net/video/Mxk8PP3vbuA/видео.html
Hi, great video, could you please help me to get the false positive output into .csv file ?
Hi thank you, yes you can put your false positives into a new dataframe then use to_csv function in pandas to write the dataframe into a csv file
@@CodeTradingCafe Hi Thanks for reply, It worked out... I was curious, If we change only the "Engulfing Candle Pattern" code Block with other Candle pattern block code and rest all the same, will it give the accuracy for that pattern?
This is good it's working, yes we can change the block for engulfing patterns and simply use only this in your test to get it's accuracy.
@@CodeTradingCafe Thanks for clearing the issue with quick responses.
Thanks again, looking forward for more new content.
@@priyansh02chawda more is coming, I will try to bring scalping bots as next step
I would love to see how to use these signals in automate trading
I personally wouldn't advise fully automated trading, I prefer algorithmic trading where if the program detects an opportunity it will send an email or a message somehow and it's up to the trader to take the final decision. I believe you have better chances of winning this way.
Thank you
Again... Nice nickname 🙂
Hi men Excellent videos, can you make videos with exit point and calculation of fees ?? Thnx.👍
Hi, thanks, fees might vary depending on broker and type of account. My purpose was to compare different technical methods to see which is best. Exit points are added in future videos when possible but it's the most difficult to guess.
Hello sir, great information indeed! just have a question does this data help with ML to be more accurate with price prediction?
Hi, not really ML is not that powerful for such problems unfortunately or I haven't discovered the way yet... Check this video
ruclips.net/video/q_0rvwPbIqg/видео.html
Next I will try neural networks
Hello my friend, thank you for providing the excellent information, but can you make a fully automated trading bot for the platform so that we can benefit from your experience, and thank you
It's in the process, however my main target here is provide educational content first, so everyone is able to understand what is the bot doing rather than simply running programs like a blackbox. Stay tuned more stuff are coming, and thank you for your comment.
You need to analyze your strategies by backtesting them, not by doing highschool pandas exercises.
Backtesting means consuming signals, entering long and short, adding spread, slippage and commissions, calculating PNL and sharpe ratios.
Otherwise it's just a waste of everyone's time.
Unfortunately I don't agree on starting with the details, top down research is a well established approach, if skipping commissions doesn't provide a winning strategy then you already know it's better to move on to a different one without wasting time on commission, spread and slippage. According to your experience what are the odds slippage would affect a daily timeframe trading?
... it's not a waste of time if people are learning how to build python programs
... it's not a waste of time if people are learning how to build python programs
@@CodeTradingCafe its a waste of time and dishonest when you add a huge "80%" in the thumbnail.
@@gzthrive2741 on a daily timeframe how different the results would be in your opinion... The 80% isn't about the strategy returns it's the accuracy.