MT5 News (Calendar) Expert Advisor Programming Tutorial

Поділитися
Вставка
  • Опубліковано 3 лис 2024

КОМЕНТАРІ • 59

  • @garikoitz428
    @garikoitz428 8 місяців тому

    You made it really easy to program calendar events based EAs. Congratulations!

  • @kwamenaplays5899
    @kwamenaplays5899 2 місяці тому +1

    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
      @currentstate8473 Місяць тому

      But how do you determine how the price is gonna go, or does that not matter?

    • @kwamenaplays5899
      @kwamenaplays5899 Місяць тому

      @@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.

  • @alexwatkin4263
    @alexwatkin4263 Рік тому +2

    Been trying to figure this out the past week! Thanks for sharing Renè, keep up the good work

  • @big5footyoz
    @big5footyoz Рік тому +2

    Once again, you are like an angel at the right time. Your videos are superb. Thanks and keep up the good spirit!

  • @steveg4051
    @steveg4051 Рік тому +2

    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

    • @samko6672
      @samko6672 Рік тому

      You may add a value of the area zone.

  • @sideshowben1982
    @sideshowben1982 6 місяців тому +1

    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

  • @allandanmasambu
    @allandanmasambu 4 місяці тому

    Thank you, Balke for this detailed tutorial.

  • @sbwent
    @sbwent 7 місяців тому

    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.

  • @KimorKim
    @KimorKim Рік тому

    HEey Rene,
    great Video again! Thanks to you I can now try to code an Filter or even an NewsTrading EA!
    Thanks al lot!!!

  • @manhhien.premium
    @manhhien.premium 6 місяців тому +1

    thank you very much! René

  • @linnelservices
    @linnelservices Рік тому

    Thank you so much Rene for this tutorial. I have implement this to my trading bot and currently testing it.

  • @sylvestredjagbavi7395
    @sylvestredjagbavi7395 Рік тому +1

    Thanks for your work ,Mr René :)

  • @fungamer51
    @fungamer51 Рік тому +1

    needed it soo badly 🥺

  • @LifeStyleVideosSA
    @LifeStyleVideosSA 9 місяців тому

    Thank you very very much, it's exactly what i needed for my EA😂

  • @championchanph423
    @championchanph423 Рік тому +1

    This is perfect. Thank you!

  • @Pates1984
    @Pates1984 Рік тому

    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

  • @Stisse12
    @Stisse12 5 місяців тому

    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? :)

  • @CJ-ui4tg
    @CJ-ui4tg Рік тому

    Thanks for this! Do you have a video on plotting higher time frame indicators in your EA?

  • @marvin1507able
    @marvin1507able 4 місяці тому

    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.

  • @muz3138
    @muz3138 6 місяців тому

    hello Rene thanks for sharing! The EA works perfectly ! However, I've tried running this through the strategy tester with no luck. any suggestions?

  • @naosei-eq6fl
    @naosei-eq6fl Рік тому +1

    do you know the massanielo management?
    can you create it for forex? it is very efficient.

  • @Etcktr
    @Etcktr 3 місяці тому

    Is the ea working for past periods with the tester? Does Tick data includes past events information?

  • @kgreen5730
    @kgreen5730 Рік тому

    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

    • @steveg4051
      @steveg4051 Рік тому

      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
      @steveg4051 Рік тому

      Looks like not available for strategy tester, will need to create a table of news events and lookup date/time against that.

    • @kgreen5730
      @kgreen5730 Рік тому

      @@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.

    • @steveg4051
      @steveg4051 Рік тому

      @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.

  • @ravanhadi
    @ravanhadi Рік тому

    Dear René, Could you evaluate the performance of "Project Evolution Breakout Scalper" EA?

  • @flyingvnman
    @flyingvnman 5 місяців тому

    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.

  • @miguelzapata6329
    @miguelzapata6329 Рік тому

    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.

    • @Willbrse
      @Willbrse Рік тому +1

      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

  • @gndundegibango4114
    @gndundegibango4114 Рік тому +2

    Please upload your courses to Udemy too.

  • @kasulebaker8044
    @kasulebaker8044 5 місяців тому

    how do you filter high priority/ low priority and medium priority using code

  • @gamuchiraindawana2827
    @gamuchiraindawana2827 Рік тому

    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.

    • @jozsefcsernatoni9008
      @jozsefcsernatoni9008 7 місяців тому +1

      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!

    • @gamuchiraindawana2827
      @gamuchiraindawana2827 7 місяців тому

      @@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

  • @flyingvnman
    @flyingvnman 3 місяці тому

    but the code only works live, not in the tester. there is 0 news in the tester

  • @Tchiffer
    @Tchiffer 5 місяців тому

    Will It skip the news event?

  • @mquant001
    @mquant001 Рік тому

    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.

  • @SrenLauritsen-rq5kq
    @SrenLauritsen-rq5kq 8 місяців тому

    Hi Rene, how do you handle daylight saving in your EAs?

    •  8 місяців тому

      I don't ;) I handle it in the data that I use for testing

    • @SrenLauritsen-rq5kq
      @SrenLauritsen-rq5kq 8 місяців тому

      @ 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:)

  • @kelvint.h1158
    @kelvint.h1158 Рік тому

    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... :)

  • @sebaiissam9381
    @sebaiissam9381 Рік тому

    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 :/

    • @sebaiissam9381
      @sebaiissam9381 Рік тому

      @
      Ok thank you for your response

  • @NardusVanStaden
    @NardusVanStaden Рік тому

    Can we have the code please

  • @juggmanty
    @juggmanty Рік тому

    is there a way to do this on MQL4?

    •  Рік тому +1

      No mt4 does not have the calendar api

    • @juggmanty
      @juggmanty Рік тому +1

      @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

  • @alisterjohn4360
    @alisterjohn4360 10 місяців тому

    Very good!

    •  10 місяців тому

      Glad you like it :)

  • @CodeFireBull
    @CodeFireBull Рік тому

    Hello rene ,Can I get your telegram contact

    • @CodeFireBull
      @CodeFireBull Рік тому

      I really like the way you make tutorials on UA-cam