I Tested This 1-Minute Box Breakout Strategy for 2 Years… Here’s What Happened!
Вставка
- Опубліковано 8 лют 2025
- In this video, we test a 1-minute scalping strategy using a Box Breakout Indicator on EUR/USD. This simple yet powerful breakout strategy identifies price ranges in 5-minute intervals and executes trades when a breakout occurs. We’ll code it in Python, backtest it over 2 years, and analyze the results! 💡
🔹 How does the Box Breakout strategy work?
🔹 Is this scalping trading style profitable?
🔹 Can this 1-minute breakout strategy beat the market?
💬 Let me know if you’d like me to improve this strategy on different timeframes. Don’t forget to like, share, and subscribe for more trading strategy backtests! 🔥
📘 Book available on Amazon (Algorithmic Trading Hands-On Approach Using Python):
a.co/d/6woMBHt
Discount Vouchers for my Algorithmic Trading and Python Backtesting courses:
💲 Algorithmic Trading: bit.ly/CouponA...
💲 Monte-Carlo Strategies Backtesting: bit.ly/Monte-C...
💲 Machine Learning Methods In Algorithmic Trading:
bit.ly/CouponM...
💲 Data Analysis with Numpy and Pandas: bit.ly/CouponD...
💲 Python Beginner Course With Solved Exercises: bit.ly/CouponP...
💲 Object Oriented Programming in Python: bit.ly/CouponOOP
Get the Python code & data files:
drive.google.c...
#Trading #Scalping #BreakoutStrategy #Forex #PythonBacktest #DayTrading #AlgoTrading
You use a 2:1 Risk-Reward Ratio, so you do not let your profits run. Maybe it works better with a Trailing Stop and you should cut your losses more quickly by pulling the Trailing-Stop in long position under the red candle who closes below the previous green candle and vice versa for short trades.
Hi thank you, I agree a trailing stop is worth the try... it might work but also it might cancel some short distance winners.
@@CodeTradingCafe nobody ever uses the trailing stop on automated progamming and i don't know why, but i think its the opposite problem of canceling short winners. I think it has more to do with trades staying open longer without a take profit when you're focused on the stop. it ties up your capital longer and lowers the frequency of trading. please experiment with it. i want someone to go all the way and introduce the right way to do it to my youtube feed
I also found this same strategy in another video. I combined it with a trend indicator so I only trade the breakouts that match the current trend. As well, since I've been trading forex for a few years, I also incorporate key support and resistance levels so I do not trade candles if we are too close to a resistance level. For instance, I stopped trading Jan 31 when XAUUSD approached the 2800 all time high. That actually saved me several losses.
After one month trading a small $1000 USD account with 500 to 1 leverage, I am up just over 30% with no losses greater than 4%. I'm thinking of reducing risk to 3%. But my win percentage was just under 90%. Again, I did not follow the strict breakout rules. I was also using my own support resistance strategy combined with the box breakout.
After another month with such positive results, I will apply this to a larger funded account and see what happens. But this is much better than my old support resistance strategy. The simple fact is that you cannot automate this as a strategy. I'm calling it high frequency micro trend trading. I love it.
Hey @john_sparls thank you for sharing, I would say any strategy can be automated some are harder then others though
@-..-..-..-..-..-..-..-..-.. I have some past videos using trailing stop but on different strategies
This is a good usage for strategies like darvas box, nice!
Glad you like it, thank you !
Hi, I would like to ask you an idea for a future video, how given a portfolio of stocks or ETFs we can evaluate the correlation of those. I am currently trading multiple stocks but I am not sure how to evaluate if this is adding more or less correlation. This is not a trading strategy but it can be really helpful :).
Hi, thank you, your suggestion makes sense I will consider correlation tests for a future video.
Thank you ! I wonder how this would look trading something extremely volatile like TSLA ? The first half-hour is a real whipsaw so that should be ignored. With currencies, did you try higher timeframes to cover the spread and commission ?
I haven't tried timeframes yet, but I think this is a good point, because the minutes are easily drowned in fees.
do you have a way of backtesting multple strategies running on a single data set like back to back
also a way of trailing stops in the backtesting environment
for this stragey i think it can work well as entry confirmation in conjustion with a slightly higher timeframe strategy like 15m or 30m
great work as always
Hi, thank you!
multiple strategies backtesting can be done using the same framework (Backtesting.py) but you will need to code each strategy in a separate class on its own.
Trailing stop yes done it before, the issue is I can't find which video, so maybe I will have to do it again :)
I think if you fix the date and time format, the summary will look better. Also, given the system you are working with, the delay in executing or closing an order will have a significant impact.
I have tested many high-frequency strategies and realized that you can’t rely on just one. Since you’re trading against the unknown, a dynamic approach is essential.
Additionally, I believe you should give ML models another chance-consider training the model on low-timeframe candles to capture long-term trends.
FYI, the results I shared in my comment on the previous video are the result of the ML model.
Hi, thank you, yes I remember you mentioned you used ML and got interesting results, I agree it's good to revisit ML, someone also suggested using ML to filter good trades maybe the model can captures a pattern to take or others to be avoided.
Yes, exactly. I used XGBoost and converted the data so that the results would be binary, making it similar to image classification. The historical data was provided along with the current data.
I did something similar in the past, maybe should retry on different timeframes.
Yes, I saw your videos; that’s why I suggested reinvesting.
thank you for your detailed explainations.. I am am beginner and they are very informative and helpful and a joy to watch...a longer time frame will mean less commisions , means more toward profit I guess? would 10 mins , 15 mins , show some sig difference?
Glad it was helpful! I wouldn't try anything below 1H the difference will be minimal. My preferred timeframes are 4H and daily but these might be too slow for some traders, anyway it's easy to try and run the backtest for verification.
do you have any pine script strats?
No sorry, no pine script just python.
@@CodeTradingCafe is a place to get the python code?
In the description of the video
Can provide it for you
@@tradewithclaude5688 paste it
It is good also for crypto trading?
I might be, there is only one way to find out :)
@ any advice for the settings?and also do you have the pine script code update V6? Because now is asking V6 version
No pine coding for me sorry, just using python
New idea please backtest a strategy using renko chart and how to use the strategy in live market ❤
We could try it but renko is not that impressive.
Great vid. I have an EA that trades a similar strategy.
Nice! Good luck!
Hey can you please provide scanner of coins with certain criteria or indicators...it will be help full for me, please provide python code for this thanks for considering....in advance.
What kind of criteria? do you have a reference example?
Can you please do a video about pulling data from MetaTrader?
I will check it out never used MT this way, but I know there is a python library to connect MT and Python
Pulling data from MT5 is straightforward. Just read the documentation. It is well written with lots of exaples, and if I understand it, everyone will.
@robertbendkowski3385 Hi thank you for the answer
@@robertbendkowski3385 i tried pulling data but the volume is always 0.
what if we sell on every buy signal and vice versa
Haven't tried it but worth a try...
if it works on no commision, than mirror it and add commission is not good idea to
me
not sure it would work if the indicator is doing its work
This is the turtle short strategy !
Thanks! I didn't know I thought it's more Dravax box, lots of names to follow up :)
Please can someone share the file to run directly on terminal cause I don't know to use python,thank you
You will need to download Anaconda that's the easiet way, then you will have Jupyter installed which you can use to read the ipynb file provided here
@CodeTradingCafe i still don't understand those apps to use that's why i asked if possible send the ea file to run on terminal
No worries, it's actually a coding language named "Python" very widely used now because of AI hype.
@@CodeTradingCafe so is not possible to get a file to run it on mt4-5
As is no, but it needs to be translated into mql language first
Make it on M5 and try to put SL 1 pip below the box
EDIT: Dont bother, I checked it already, strategy is worthless. You can make some ML filtering so we can learn something.. But test it on OOS!
Hi thank you for letting me know, I think the ML idea is a good point, I am in for it.
works great on small caps, intra day breakouts, turn on the algo on optimally bio tech first green day so shorts arent crazy, let it consolidate after open and sell off look for change in bids and walking up the bids, turn on the algo, and than use simple risk management stop at lows try to sell into high of day, or open Highs. But this would require you actually know how to trade and dont just use FX or crypto this requires US stock market, trading low floats.
@@setfreeyourselfthx bro for insights, but I prefer fully automatic and on highly liquid markets, have portfolio of about 30 already with intracorrelation
For retail traders, no mechanical scalping strategy will work. The spread and commission costs make that impossible. It is always better to concentrate on swing strategies where the spread and commission take a smaller percentage of your profit.
I don't understand why most traders are so fixated on scalping!
And I usually skip anything that looks like scalping or is on very short timeframes. This video was an exception because I am often curious about your tests and wonder if the same works on a 1 hour timeframe.
Hi you are absolutely right, I personally prefer the daily timeframe it's much easier and less noisy, and mostly the trading fees are negligibly small compared to the price range. But I was curious about this one since I saw it somewhere on UA-cam with lots of high hopes :) I could eventually try it on higher timeframes (4H maybe) at the end it's a classic break out above recent high or below recent low, the "Box"concept is meaningless.
@@CodeTradingCafe I totally agree about daily timeframe and think daily timeframe should be the first choice of every retail trader. The biggest advantage of daily timeframe is that economic events usually have a small impact on it.
I hate it when people do blanket statements like this. Me myself im a scalper, and the reason why Im draw to this channel is because of the coding. Im working on trying to automate the strategies i have been using manually. And the way I overcome commission costs is every trade i take, I add 1 pip specifically for costs. My broker each trade costs about 7 points, so 1 pip more than covers all costs. So if my target is 10 pips, my TP will be at 11 pips. If you are a scalper, always add 1 pip to each trade, that way your strategy if you have edge will not be affected by trading costs. About spread, for me I dont count that as a cost, if you cant research brokers with excellent spreads, then you are not ready to trade, needless to say any pair with more 1 pip spread has to be very volatile, else its not worth it. High volitility will always cover for bigger spreads, for example Gold
@@rharuperi If it works for you then it's great and you should keep doing it. But in your response you actually made my point clear. You already lose 10% of your odds at the entry because of that 1 pip and that's the whole point I wanted to make.
For the rest I wish you the best of luck, because you will need it more often.
@rharuperi I couldn't advise automating scalping because I am not good at it, I find it easier to automate on slower timeframes like the daily, but I do agree that other traders can scalp successfully , it's good you shared your point of view and experience, it encourages me to reinvest some time in scalping / backtesting.
Hey there. I have a strategy which I wanted to share with you. Even emailed you a while ago. Let me know whenever u have time for it. Would love to share it with you 😊👍🏻
Hi, I am really sorry days are long and full at this moment, lots of projects... one day I will build my team :)
@ I can understand, I will be waiting though…And will keep supporting your videos 🫡
Expectancy =0.34X (2/1) -0.66
=0.02 That means you can expect to make 2 cents for every $1 deployed on the strtegy ......
🤥 Also accuracy is needs to improve ..... 7+ hits in a row guranteed! Drawdown is too high.......
Well it's scalping, high frequency usually comes at a price.