This is the basis of my NewsScalper EA. I place a stop order with tight trailing SL seconds/minute before event and close position seconds after it hits. Easily 1:7 risk reward. Thanks for this video, René 👍✌️
@@currentstate8473 Not necessarily. It’s volatility you’re looking for at that point, if the news is surprising enough (e.g. shockVal=ForecastVal-actualVal) price is very likely to travel far in both directions. Tight SL for in case TP is too far and trade quickly reverses, and also slippage taken into account. The trade is not expected to last over a minute or two. In and out in seconds.
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
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
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? :)
Hey René, this may be an older video, but anyway I have a question about the Calendar functions. Ive written an EA that places buy stop and sell stop just before high impact news. But running the Strategy Tester, there are no news events found while running. Do you have a solution for that? Ive used your code to get the news events.
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).
@@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 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.
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
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
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.
@ 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:)
@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.
You made it really easy to program calendar events based EAs. Congratulations!
This is the basis of my NewsScalper EA. I place a stop order with tight trailing SL seconds/minute before event and close position seconds after it hits. Easily 1:7 risk reward.
Thanks for this video, René 👍✌️
But how do you determine how the price is gonna go, or does that not matter?
@@currentstate8473 Not necessarily. It’s volatility you’re looking for at that point, if the news is surprising enough (e.g. shockVal=ForecastVal-actualVal) price is very likely to travel far in both directions.
Tight SL for in case TP is too far and trade quickly reverses, and also slippage taken into account.
The trade is not expected to last over a minute or two. In and out in seconds.
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!
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.
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, Balke for this detailed tutorial.
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.
HEey Rene,
great Video again! Thanks to you I can now try to code an Filter or even an NewsTrading EA!
Thanks al lot!!!
thank you very much! René
Thank you so much Rene for this tutorial. I have implement this to my trading bot and currently testing it.
Thanks for your work ,Mr René :)
needed it soo badly 🥺
Thank you very very much, it's exactly what i needed for my EA😂
This is perfect. Thank you!
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
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? :)
Thanks for this! Do you have a video on plotting higher time frame indicators in your EA?
Hey René, this may be an older video, but anyway I have a question about the Calendar functions. Ive written an EA that places buy stop and sell stop just before high impact news. But running the Strategy Tester, there are no news events found while running. Do you have a solution for that? Ive used your code to get the news events.
hello Rene thanks for sharing! The EA works perfectly ! However, I've tried running this through the strategy tester with no luck. any suggestions?
do you know the massanielo management?
can you create it for forex? it is very efficient.
Is the ea working for past periods with the tester? Does Tick data includes past events information?
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.
Dear René, Could you evaluate the performance of "Project Evolution Breakout Scalper" EA?
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.
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
Please upload your courses to Udemy too.
how do you filter high priority/ low priority and medium priority using code
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
but the code only works live, not in the tester. there is 0 news in the tester
Will It skip the news event?
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.
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:)
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... :)
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
Can we have the code please
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.
Rodriguez Michael Allen Deborah Williams Betty
Very good!
Glad you like it :)
Hello rene ,Can I get your telegram contact
I really like the way you make tutorials on UA-cam