How To Improve A Live Trading Bot For Forex (Part 1 of 2)

  Рет қаралды 11,536

CodeTrading

CodeTrading

4 ай бұрын

In today's video, we dive into optimizing FOREX trading strategies using a live trading bot. Our focus is on enhancing the performance of Forex trading bots through strategic modifications and updates. If you're keen on mastering the art of Forex trading automation, understanding moving averages, Bollinger bands, RSI indicators, and optimizing stop loss (SL) and take profit (TP) settings, this video is a must-watch!
Forex trading automation has revolutionized how traders approach the market, offering a blend of precision, speed, and efficiency. However, even the most sophisticated trading bots require periodic reviews and adjustments to align with the ever-evolving Forex market dynamics. In this detailed walkthrough, we explore the intricacies of improving a live trading bot, aiming for increased profitability and reduced drawdown periods in Forex trading.
We start by examining the core components of our trading strategy, which leverages moving averages and Bollinger bands for trend detection and entry signals. Our initial success, backed by a 60% return in three months, sets the stage for further refinement. Despite a promising start, we've identified areas for improvement after a performance dip, highlighting the importance of continuous optimization in Forex trading strategies.
Key to our strategy enhancement is the integration of the Relative Strength Index (RSI) to confirm trend directions, offering a faster and more reliable method than traditional moving averages alone. This adjustment aims to increase trade accuracy and avoid losses during trend reversals.
Furthermore, we delve into the critical process of optimizing SL and TP parameters based on recent data, employing a forward-testing method akin to machine learning algorithms. This approach ensures our trading bot remains adaptive and responsive to current market conditions, a crucial factor for sustained success in Forex trading.
The video also covers the concept of a sliding window for parameter optimization, ensuring our trading bot is consistently fine-tuned and up-to-date with the latest market trends. This method not only enhances performance but also aims to generalize the bot's effectiveness over broader time frames.
Lastly, we introduce a trade management improvement - the break-even approach. This strategy minimizes risk by securing profits and adjusting SL positions in real-time, exemplifying our commitment to reducing drawdown periods and values.
Join us as we dissect these enhancements with practical examples, backtesting results, and live trading insights. This video offers valuable strategies, tips, and insights to elevate your trading bot's performance.
Stay tuned for our next video, where we'll dive into the Python code modifications and evaluate the outcomes of these improvements in real-time trading scenarios. Trade safe, and see you in the next one!
🔥The below videos have also links for the source codes in Python, so you can download the codes from there...
🔥How to Optimize any strategy (must watch!): • Maximize Trading Profi...
🔥The strategy description and backtest: • Trading with Python: S...
🔥The live trading bot we used for testing: • Live Trading Bot Strat...

Пікірлер: 76
@obrayanbravo5380
@obrayanbravo5380 4 ай бұрын
Hello bro, greetings from Cuba! I have seen all your videos and they seemed like the best of the business on KZbin. I am trying to make an LSTM model but applying Shannon's entropy to predict when a reversal pattern will occur in the 50% Fibonacci daily temporality that occurs. in gold with a 73% probability that it will occur at least once a week, for this I have relied on some indicators such as Vidya, but I also want to incorporate an LSTM network that predicts in which zone the 50% fibonacci will be for the next day using entropy and the moving average technique but with time windows based on the previous 50% fibonacci, I would like to see if you would be willing to help me with this, since I have based myself on your videos to make the model, especially the videos about LSTM and how to build fibonacci retracements, I hope you read my comment! a hug !
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Hi thank you for your support and for your interest. Check this video on coding Fibonacci retracement you might be interested in something similar: kzbin.info/www/bejne/aaPQqGOLe8yMo7M
@obrayanbravo5380
@obrayanbravo5380 4 ай бұрын
@@CodeTradingCafe Hello, you don't know how happy it made me that you responded to my message, so I had already seen the video that you recommended, in fact I started to build my model by making some modifications to it, with respect to the approach with which the Fibonacci retracement is used, I I am not a programmer but I am an industrial engineer and I specialize in process design, then in the community of traders there is a wrong approach when it comes to using fibonacci in stochastic processes such as the stock market, since they use fibonacci In a dynamic way, that is, it moves with the price. In my 4-year studies I have been able to confirm that this is not the most feasible way to use the Fibonacci. The most feasible thing is to keep the Fibonacci fixed for a time interval, for example the candle. 15 min from 9 to 9:15 in the morning every day, using it this way allows you to find stationary patterns in time intervals and from these patterns to design the trading system, which happens that since I am not a programmer it is difficult for me to keep track of the strategies to codes, I have detected some time intervals where stationary reversal patterns are detected but since I am not a programmer it is difficult for me to put it into code, that is why I wanted to collaborate with someone who was a programmer, in case anyone who reads this is interested! I hope you have understood me and it is of help, greetings
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
I see what you mean, I never tried it this way so I don't know the potential I will pin your comment for a week or so maybe some programmers in here can helps you out, they can reach out through this comments thread. Good luck!
@MasamuneX
@MasamuneX Ай бұрын
LSTM's are great buy only feed relative percentage data into them no absolutes also shannon entropy can be tricky as counting the number of unique prices can be very hard id suggest binning the prices into 100 bins in a rolling window. so that even if they are not exact then its okay also the shannon entropy of a stock price is sorta like the predict proba function
@hacklab6757
@hacklab6757 Ай бұрын
Increíble thanka bro from Cuba! I'm a computer scientist using lstm long time ago, but instead of Shannon I use Kalman filters to ease the prediction off the next movement . I will pin this discussion because I will join this community. Thanks for being open
@christophermatthews4896
@christophermatthews4896 4 ай бұрын
this is turning into one of my favorite channels on youtube
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
So nice to read :) thanks a lot for your support!
@animeshbarai6804
@animeshbarai6804 4 ай бұрын
i can't wait for the next part sooo much excited✌✌✌✌✌✌✌✌✌✌✌
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
I'm working on it, thank you for your support!
@samuelpatterson4031
@samuelpatterson4031 4 ай бұрын
Looking forward to the next one!
@christophermatthews4896
@christophermatthews4896 4 ай бұрын
agree! love this channel!
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Thanks a lot for your support, comments like yours really matter (especially when views are relatively down gives me the impression that the content is not that interesting).
@BoHorror
@BoHorror 4 ай бұрын
Mans actually implemented the breakeven approach,damn thanks a ton G for listening, appreciate it.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Any time!
@preetipics
@preetipics 4 ай бұрын
Awesome thanks a lot. So important to remind people models/bots are never build, set and forget. Always need optimising as things change
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Glad it was helpful! I wish I can set like 3 bots and forget them for life... sometimes it's more work than manual trading :)
@robertbendkowski3385
@robertbendkowski3385 4 ай бұрын
I've learned so much from you! Keep up the great work and thank you very much for what you have done so far.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Glad to hear it! Thanks a lot for your support, more videos/strategies are coming!
@niklas8584
@niklas8584 4 ай бұрын
Thanks for the video! Really appreciate the new content The new live transcriptions did not really do it for me. I made the sections of the video feel more like a TikTok rather than the high quality content they are.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Hi, thank you for your feedback I was wondering if the style fits (with all due respect I don't like to look like a TikToker :) )
@bombasticiti
@bombasticiti 3 ай бұрын
You're really helpful, thanks bro.
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Happy to help, thank you for your support!
@7rang.
@7rang. 4 ай бұрын
Thanks for the video. Then you can add a Monte Carlo simulation.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
I's love to, MC is my specialty, might be too much for a YT video but why not.
@hacklab6757
@hacklab6757 Ай бұрын
Monte carlo simulations are awesome to map probability spaces . Thanks for sharing your knowledge bro
@paniskonayoutube
@paniskonayoutube 4 ай бұрын
Very cool info video !! thx for this video :) nice
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Glad you liked it! thank you for your supportive comment!
@eliotharreau7627
@eliotharreau7627 4 ай бұрын
Bless, Very nice and very interessant project, we wait impatiently for the next video. Thank you brother.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
More to come! thank you for your support!
@meawpong2008
@meawpong2008 4 ай бұрын
I'm so existing to watch a new code soon.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Thanks a lot for your constant support!
@GamerKieran
@GamerKieran 4 ай бұрын
Really appreciate the work that you are doing. Highly interesting. 😃
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
So nice of you, thank you!
@GamerKieran
@GamerKieran 4 ай бұрын
@CodeTradingCafe been non stop watching your Algorithmic Python course on Udemy. Straight to the point, no waffling, easy to follow and again really interesting. Most videos on the subject I've fallen asleep within the first few minutes, would definitely recommend to anyone thinking of buying the courses over on Udemy. The way you use the graphs to plot the data makes it really easy to visualise the different concepts.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Thanks a lot for your support, I will have to think of one more course I have in mind, more advanced, but it will take me months, now not much time available. Good luck with your coding.
@abdsh422
@abdsh422 4 ай бұрын
Thanks for sharing, that makes sense. I have a quick question: How do you implement the break-even stop? Is there a specific function in the API you're using (I am using MT5), or do you keep checking the price periodically?
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Hi, thank you for your support! No specific function for the break even I just have to use an algorithm: 1- open 2 trades half size each, with TP and TP/2 2- test every 5 min if there is one trade opened, this means that one was closed so change the SL of the remaining to the entry value. this is how I used it also in the Python code, I will try to record it this weekend hopefully upload it during the week.
@shadrackdarku8613
@shadrackdarku8613 4 ай бұрын
Sweet
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Thank you!
@dataml-trading4085
@dataml-trading4085 3 ай бұрын
Nice Tutorial ! Can't wait the next video. This strategy technique can be applied for the crypto market?
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Yes, absolutely it should work on any market provided you tune it slightly. The new video is out kzbin.info/www/bejne/mYDTpXlqnciMntU
@bruh-wy4wq
@bruh-wy4wq 4 ай бұрын
Is it possible to implement custom made indicators by the community from trading view ? Thanks for the great content!
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Yes it is, only if we have the math behind, if the indicator is a blackbox I don't think we can reverse engineer it easily. Thank you for your support.
@bruh-wy4wq
@bruh-wy4wq 4 ай бұрын
@@CodeTradingCafe There are many open source machine learning classification algorithms on tradingview, would love to see you implement some in python, I believe it would go great with your optimization videos!
@bruh-wy4wq
@bruh-wy4wq 4 ай бұрын
@@CodeTradingCafe Most indicators on tradingview are open source! Maybe you can try out some machine learning classification indicators, they would go along with your optimization videos very nicely.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Thanks for letting me know, I don't use TV a lot and wasn't aware that ML is now implemented.
@juanbernal8105
@juanbernal8105 4 ай бұрын
That has been a problem that I have never known how to solve, where is the limit of optimization and over-optimization. All strategies work, in a certain market regime. It is essential to continually adjust, but how much? Depending on volume, ATR or VIX? We remain expectant. Thanks for sharing.
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Hi, There is no rule as this depends on the case you are solving, if here over-optimization solves it I guess why not use it, I will check it out in a test and see.
@muhireinnocent2371
@muhireinnocent2371 3 ай бұрын
it would be great if you would also create a video on how to create a deep reinforcement learning trading agent .
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Thought about it, but I am not sure it will be of use, this is why I haven't done it yet.
@muhireinnocent2371
@muhireinnocent2371 3 ай бұрын
@@CodeTradingCafe I thought drl can provide better results since the agent will be getting rewards from it's market actions.what are the reasons why you have think it won't help . I was trying to build one and I was hoping to learn from you.
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
I think it acts like any neural networks, the difference is that it's learning on the fly but at the end it's still neural nets.
@GAMINGASTER
@GAMINGASTER 3 ай бұрын
I'm so excited for the plzz giv the code ❤
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Hi, check this video description the links for the code are there: kzbin.info/www/bejne/mIvLpamse9JkbaM
@hfg16
@hfg16 4 ай бұрын
Can this be applied to crypto ??
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
Yes definitely, as long as you tune the parameters for crypto.
@bkasoul9643
@bkasoul9643 2 ай бұрын
It is challenging to determine the sequence of the videos.
@CodeTradingCafe
@CodeTradingCafe 2 ай бұрын
Hi, sorry about this, I think if you press the videos tab from the channel page you can get them in release date order, it might be easier this way.
@bkasoul9643
@bkasoul9643 2 ай бұрын
@@CodeTradingCafe I purchased your Udemy course, and it’s very good. Thanks for putting this material out. I would only suggest that could a separate playlist be created with on the videos that reference other videos. When you say “ Like it was performed in my other videos, check the description below” . The actual description below is a large playlist with a mix bag a videos. Just as a suggestion….
@CodeTradingCafe
@CodeTradingCafe 2 ай бұрын
Yes thank you, I am aware it's becoming a bit messy, but anyway I would still need to refer all the videos where we used the same approach maybe.
@avtooor
@avtooor 3 ай бұрын
Hey bro, really appreciate your work, but I wonder if you make some real profit from these strategies, cause when I tried to implement some of my trading strategies after optimizing their parameters, every time I launched them they were losing, so I don’t really have a strong belief yet that this might really work in market(
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Profit yes, but not in fully automated mode, I usually trade hybrid, sending myself signals and then I decide if I open the trade and how to manage it afterwards.
@aamirpathan658
@aamirpathan658 4 ай бұрын
How can I test pls explain
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
I will backtest in the next video. with the python code.
@user-bj3ie5cg3u
@user-bj3ie5cg3u 3 ай бұрын
why not just manually trade this, to avoid the bot problems
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Actually you are absolutely right, exactly my thoughts, the backtesting here is just to confirm that it works, then we can trade it manually because also the trade management is more complicated to automate (but not impossible just requires time).
@sankyuubigan
@sankyuubigan 4 ай бұрын
need connect ai to traiding. without ai it is useless...
@CodeTradingCafe
@CodeTradingCafe 4 ай бұрын
This is AI, behind AI lay sets of rules just like those we are simplifying here. If you meant Machine Learning I have videos using classifiers, check them out they might be of interest.
@purasuerte1.0
@purasuerte1.0 3 ай бұрын
if you backtest this strategy for the last year, it does not make profit at all...
@CodeTradingCafe
@CodeTradingCafe 3 ай бұрын
Hi, it does but you need to optimize the parameters, it's hard to know exactly why you didn't see any profit through messaging, but if you optimize let's say on the first 6 months of the year and predict/use the model on the next 6 months it usually leads to positive returns.
Trading with Python: Simple Scalping Strategy
13:47
CodeTrading
Рет қаралды 83 М.
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 82 МЛН
Increíble final 😱
00:37
Juan De Dios Pantoja 2
Рет қаралды 105 МЛН
ROCK PAPER SCISSOR! (55 MLN SUBS!) feat @PANDAGIRLOFFICIAL #shorts
00:31
Неприятная Встреча На Мосту - Полярная звезда #shorts
00:59
Полярная звезда - Kuzey Yıldızı
Рет қаралды 6 МЛН
Rayner Teo Bollinger Bands Strategy Backtest In Python High Return
23:29
What is Algorithmic Trading & How to Get Started
15:56
TradeOptionsWithMe
Рет қаралды 538 М.
HFT Trading Bot Strategy 2023
20:01
Jacob Amaral
Рет қаралды 43 М.
LSTM Top Mistake In Price Movement Predictions For Trading
9:48
CodeTrading
Рет қаралды 77 М.
Creating a Day Trading AI with a Deep Neural Network in Python
17:44
I Decoded The Liquidity & Manipulation Algorithm In Day Trading
14:47
The Secret Mindset
Рет қаралды 760 М.
The day of the sea 🌊 🤣❤️ #demariki
00:22
Demariki
Рет қаралды 82 МЛН