MT5 News (Calendar) Expert Advisor Programming Tutorial
Вставка
- Опубліковано 30 чер 2024
- *Complete MT5 Programming Course: en.bmtrading.de/mt5-masterclass/
*Recommended Broker: en.bmtrading.de/broker/
*Free Trading Journal: en.bmtrading.de/tradebuddy/
**FTMO Funded Trading: trader.ftmo.com/?affiliates=y...
**myForexFunds Funded Trading: myforexfunds.com/?wpam_id=146...
*These Links redirect to my webpage where you can find free or paid products and lots of useful information.
**These Links are Affiliate Links. If you use this link you can support the channel because I will receive a commission form the company. You do not have any disadvantages of course!
Learn about the benefits of automated trading. After programming trading strategies for a while I started teaching how to program expert advisors for the MT4 (MetaTrader 4) and MT5 (MetaTrader 5). Until now I only did videos in German but now I will start this channel with English videos to reach a larger audience of traders and help them improve their trading. There will be no fake trading on this channel and no lies. I show trading as it is - the good and the bad sides. Stay tuned and subscribe because you don't want to miss ;)
Instagram: / rene_balke
Trading in derivative products such as futures, options, CFDs, Forex and certificates involves a considerable risk. These products are not suitable for every investor. Investors could potentially lose all or more of the original investment. If anything, only money that equals personal risk capital and can be lost without jeopardizing financial security or lifestyle should be used. Partially or fully automated trading programs can only be used to support the trader. Past performance is not an indication of future results.
Thank you, Balke for this detailed tutorial.
Been trying to figure this out the past week! Thanks for sharing Renè, keep up the good work
Once again, you are like an angel at the right time. Your videos are superb. Thanks and keep up the good spirit!
Thank you so much Rene for this tutorial. I have implement this to my trading bot and currently testing it.
HEey Rene,
great Video again! Thanks to you I can now try to code an Filter or even an NewsTrading EA!
Thanks al lot!!!
Thanks René,
I started looking at doing this myself not long ago. I didn't get there because it ended in the "too hard basket and not enough time". Your method is elegant.
I would add a buffer to the startTime and endTime variables used in CalendarValueHistory statement. This will ensure that a pause in trading occurs when news is very close to start and end of day.
Admittedly, I can't find any too close in the current calendar for my broker, but different brokers will be using different time zones, people may be trading exotics and daylight savings may shift reporting time to "the witching hour" around midnight in the future.
Your tutorials often have an uncanny way of addressing my next need, will be getting the Masterclass series to try to get ahead once I bank enough from my current project.
Cheers
Steve
You may add a value of the area zone.
You made it really easy to program calendar events based EAs. Congratulations!
This is perfect. Thank you!
Thanks for your work ,Mr René :)
needed it soo badly 🥺
just running through this great tutorial again. Thnaks Rene, and relized that timecurrent gives you the server time not the time stated in meta trader as thats always in moscow time. so anyone blindily copying will have to adjust accordingly
thank you very much! René
Thanks for sharing. Very easy to code and I can now use it in my EAs to avoid trading at times of High Impact news.
Thanks for this! Do you have a video on plotting higher time frame indicators in your EA?
Thank you very very much, it's exactly what i needed for my EA😂
Hi René,
Great video as ever. Thank you so much!
What is about backtesting an ea with this kind of filter?
Danke im Voraus 😉
Patrick
hello Rene thanks for sharing! The EA works perfectly ! However, I've tried running this through the strategy tester with no luck. any suggestions?
Dear René, Could you evaluate the performance of "Project Evolution Breakout Scalper" EA?
do you know the massanielo management?
can you create it for forex? it is very efficient.
Great video, just when I was learning how to work with the calendar you upload this video! great timing Rene!
Is it possible to show how to backtest using historical calendar data, I am trying to figure it out. Much more complicated than expected to use in strategy tester
I have started looking at it in the strategy tester, I made a mistake so I am back to the beginning...
I believe you will need to use an iTime call instead of TimeCurrent to get the time of the signal bar +1 (current time for the strategy tester).
Looks like not available for strategy tester, will need to create a table of news events and lookup date/time against that.
@@steveg4051 Yea it doesn't seem possible to read calendar data during strategy tester purely with the code in ontick(). I have searched for hours in the mql5 forum, I downloaded some shared code that involves including some mqh header files into the main expert advisors code, I have had no luck getting it to work though, it is above my knowledge.
@kgreen5730 I was looking at using the lookup function that René used for the fake AI EA to read saved chart data. If you can capture what he coded I reckon I should be able to modify to suit reading news data. I can capture High and medium impact news for USD, AUD, GPB ,EUR, JPY, CAD ,CHF. I am looking at GMT +3 for MFF.
Hi René,
Does this function really get events that have not past? If not, then you cant use it for comming events to stop trading before its to late?
CalendarValueHistory are only past events ?
This complicates alot when backtesting also, since its not the same structures for future and past events?
Or have I missed the train compleatly here? :)
Please upload your courses to Udemy too.
hi Rene, It seems to only work if I use the code for live trading, but not backtesting. So the problem is I cant backtest strategies with a new filter. Do you have any solutions. Breakout stra doesnt care much about news but regular stras do so pls help.
how do you filter high priority/ low priority and medium priority using code
Will It skip the news event?
Hi, is it possible for you to review a code of mine? Ive been trying to get it to work for the past 2 months but I am still far from complete... :)
Hi Rene, how do you handle daylight saving in your EAs?
I don't ;) I handle it in the data that I use for testing
@ Ok i see in Tick Data Suite, so i guess im fine to. I added some calculation with GMT server and local offset as i use Asia session in my algo, and i was concerned it placed the session wrong at daylight saving:)
excellent idea of scheduling calendar events, but why did you choose low-priority events, when the most important is the high-priority ones that increase volatility. I would like you to edit it again but pause from trading 30 minutes before not trading and 30 minutes after the news.
He didn't choose them. The "continue" there makes these get ignored.
I also pause trading or set open positions to break even 30 minutes before some news
Can we have the code please
Hello
Please make a video to help us understand how to Automatically optimize an EA to a selected chart using a Python Script and the MT5 module for Python. Everything I've learned so far either :
1) Simply didn't work
2) Didn't make use of the MT5 Python module
3) Required me to learn C++ and build a DLL but I'm already learning MQL5 and Python at the same time, adding a third language to the list doesn't seem feasible for me, I'd be over complicating things for myself.
How can I automate the entire process of Optimizing my EA and exporting the results using Python and the MT5 module only.
Once I know how to do that, I can easily process the optimization results using scikit learn and try predict more profitable optimization settings.
I'm asking because I realised that as you move your expert advisor from one chart to another, it needs to be optimized again and doing it by hand for the rest of my life isn't attractive.
Hi. To be honest, Python is just somewhat supported by MT5. If you create an EA in MQL5, you can automate the optimization or you can use an application to automate it. Good luck!
@@jozsefcsernatoni9008 Hey, thanks for your point of view bro. You're right python is the way to go, furthermore the MQL5 API is intentionally designed to mirror certain Python functionality making life easier
Can you please share with us the codes with MQL4 ?
Thank you for your effort
This would not work in the MT4 unfortunately because it does not have the calendar feature :/
@
Ok thank you for your response
is there a way to do this on MQL4?
No mt4 does not have the calendar api
@okay thanks. with this code how do I show the news for indice pairs like Nas100 or US30? It works on currencies, but nothing shows when I load those charts because “USD” isn’t in the symbol name.
Very good!
Glad you like it :)
Very important functionallity to filter trades when high impact news events can affect the currency pairs we are trading. WakaWaka is recently blowing many account clients due the recent movement of NZDCAD and many of other users have avoided the nightmare thanks to the news filter functionallity avaliable.
Hello rene ,Can I get your telegram contact
I really like the way you make tutorials on UA-cam