Write Your First Super Simple MT5 Expert Advisor and Learn MQL5 Coding

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ย. 2024

ความคิดเห็น • 47

  •  ปีที่แล้ว +17

    Source Code:
    #include
    int totalBars;
    ulong posTicket;
    CTrade trade;
    int OnInit(){
    totalBars = iBars(_Symbol,PERIOD_D1);

    return(INIT_SUCCEEDED);
    }
    void OnTick(){
    int bars = iBars(_Symbol,PERIOD_D1);

    if(totalBars < bars){
    Print("Total bars changed to ",bars);

    trade.PositionClose(posTicket);
    if(!PositionSelectByTicket(posTicket)){
    double open = iOpen(_Symbol,PERIOD_D1,1);
    double close = iClose(_Symbol,PERIOD_D1,1);

    if(open < close){
    Print("last d1 candle is green");

    trade.Buy(0.1);
    posTicket = trade.ResultOrder();
    if(posTicket > 0) totalBars = bars;
    }else if(open > close){
    Print("last d1 candle is red");

    trade.Sell(0.1);
    posTicket = trade.ResultOrder();
    if(posTicket > 0) totalBars = bars;
    }
    }
    }
    }

  • @The.Oh1183
    @The.Oh1183 ปีที่แล้ว +7

    This is definitely my new favorite channel. I like that you start every video as if it was the first. It helps when someone stumbles upon your videos and they can start with any of them and not feel lost.
    On the strategy tester backtest, there is a graph for "Profits and losses by hours" and it uses the times the trades are closed. Do you know if there's a way to compute this by the times the trade was opened? For example, so I could find what times are better or worse for my EA to take trades? Thanks for any insight and thank you for sharing your knowledge!

    •  ปีที่แล้ว +2

      Thank you

    • @The.Oh1183
      @The.Oh1183 ปีที่แล้ว

      @ Thank you!

  • @VishalAttitude
    @VishalAttitude ปีที่แล้ว +1

    Very Nice Explanation
    Easy to understand
    I will love to join your every video

  • @DukeManny
    @DukeManny ปีที่แล้ว +1

    Hi Rene, please make a video of how to create an EA that provides signals on a daily basis based on candlestick patterns and price movement
    Thanks

    •  ปีที่แล้ว +1

      Hey :) I made a series for candlestick patterns. You can find it here: th-cam.com/video/CKz9DewM2Vg/w-d-xo.html

  • @geraldabbey3428
    @geraldabbey3428 ปีที่แล้ว

    Good day @René Balke . I was trying to code the EA which trades any arrow indicator, I followed your video step by step but I'm getting errors. So it's not even compiling and your help will be appreciated. Kindly find the mql5 errors below...
    'input' - unexpected token
    '=' -unexpected token
    '3' - some operator expected
    'barsTotal' - undeclared identifier
    'BufferSell' - undeclared identifier

  • @rainerfs4563
    @rainerfs4563 หลายเดือนก่อน

    very nice class. Thank you

  • @ThreshAuditore
    @ThreshAuditore ปีที่แล้ว +1

    Did you have any video for rentable bot for mt5? And how to install it? Also did you have a video of a bot that use chat gpt strategy? Thanks. Best regards

  • @Murilo75ful
    @Murilo75ful ปีที่แล้ว

    Congratulations for the videos, I am learning a lot. One question, how can I close a position based on the signals of 3 indicators, but not necessarily signals given at the same time?

  • @TMacFPV
    @TMacFPV ปีที่แล้ว

    great video, thank you! I'll be watching more

  • @SamuelMakumbe
    @SamuelMakumbe ปีที่แล้ว

    thumbs up @renebalke your content is actually something I was looking for

  • @broskynaleo3233
    @broskynaleo3233 ปีที่แล้ว

    Already trying to make an ea with this strategy for over a month now 😃. I am also adding simple moving average to only buy/sell if closes above/below. Could you maybe help me with that?

    •  ปีที่แล้ว

      Nice :) Just watch some other tutorials on this channel. I worked with the MA in many of them ;)

  • @piotrg7553
    @piotrg7553 ปีที่แล้ว

    Thanks Rene, very informative and useful!

  • @tawandadaura852
    @tawandadaura852 ปีที่แล้ว

    Good day Mr Rene... Do you have any idea on how we can trade big moves like the news

  • @Heavens-Kitchen-MMY
    @Heavens-Kitchen-MMY ปีที่แล้ว +1

    Informative video 👌 thanks for sharing 👍

  • @vincentsekoboane
    @vincentsekoboane ปีที่แล้ว

    Can you code an EA with a rectangular support/resistance or supply and demand or order block? That would be most interesting

  • @montadhernafea1822
    @montadhernafea1822 ปีที่แล้ว

    Honestly, you are a wonderful person, but I do not know programming. Can you help me in situations of many consecutive losses?

  • @baileywickens3278
    @baileywickens3278 ปีที่แล้ว

    Great Video as always René

  • @thermowet13
    @thermowet13 11 หลายเดือนก่อน

    Where can find discussion on mql5 settings from a publisher...

  • @emranmohebbi5713
    @emranmohebbi5713 10 หลายเดือนก่อน

    Suuuuuper Du hast unterrichtet.
    is mql4 same?!
    very glad to see your video and channel.

    •  10 หลายเดือนก่อน

      Thanks!! :) Have a look at this to learn mql4: th-cam.com/video/NbwMUccj3Wg/w-d-xo.html
      There are some differences compared to mql5..

  • @setupnuvemitaliana6693
    @setupnuvemitaliana6693 ปีที่แล้ว

    Fantastic, my congratulations!!

  • @vo8263
    @vo8263 ปีที่แล้ว

    Hi Rene how do we make the EA open a new trade only after the current trade has hit TP or STL

  • @triniatlarge
    @triniatlarge ปีที่แล้ว

    Hi Rene, best love your channel. I write in Mql4 but i am seeing some features in in mql5 i want to have. Can you advice what is the best reading material path to follow. e.g i am getting confused with the different classes to do trades. which one is the best one

    •  ปีที่แล้ว

      I don't really know. I would always recommend to just watch tutorials and maybe read the mql5 documentation.

    • @triniatlarge
      @triniatlarge ปีที่แล้ว

      @ Do you use mql5 storage for version control. What do you use for version control

    •  ปีที่แล้ว

      @@triniatlarge I don't use any version control because mql5 programs are usually really short and easy. Also I always work alone at programs so I don't really need it.

  • @sudemirzaei
    @sudemirzaei 11 วันที่ผ่านมา

    Perfect

  • @emmanuelthompson32
    @emmanuelthompson32 ปีที่แล้ว

    i have a question , how can one get buffer of MA based of rsi data or any indicator on mql5 , like iMAOnArray on mt4

  • @badbarney
    @badbarney ปีที่แล้ว

    Guter Mann!

  • @markonis100
    @markonis100 ปีที่แล้ว +1

    Rene, I just checked your ftmo. What happened? Did you not set the daily drawdown limit to less than 1000 USD and was it still 4000 USD? I really sorry for what happened.

    •  ปีที่แล้ว +1

      Challenge is lost.. But no worries it is fine. It is never guaranteed to win such a prop firm challenge. I think I will make a video (or a live) and make a little summary of the challenge in the next days :)

  • @viven2756
    @viven2756 ปีที่แล้ว

    I have idea for write ea then price break market structure use fibo fine retest price at lv 50,61.8 can you show some coding about fibo tool?

  • @berntinulkshredder
    @berntinulkshredder ปีที่แล้ว +1

    cool

  • @JenniferBrown-n3r
    @JenniferBrown-n3r หลายเดือนก่อน

    Garcia Betty Lopez Lisa Rodriguez Matthew

  • @robbyviklivingston1997
    @robbyviklivingston1997 หลายเดือนก่อน

    Moore Kenneth Lee Daniel Garcia Steven

  • @HousmanTim-m8j
    @HousmanTim-m8j หลายเดือนก่อน

    Robinson Linda White Dorothy Lopez Jason

  • @brookedodson2888
    @brookedodson2888 หลายเดือนก่อน

    Anderson Elizabeth Harris Scott Hernandez Linda

  • @ikiyytours2320
    @ikiyytours2320 ปีที่แล้ว

    Can I be your friend?...like for real.

    •  ปีที่แล้ว +4

      Bro it will be hard if you do not live in my neighborhood :D But we can be TH-cam friends for sure

    • @ikiyytours2320
      @ikiyytours2320 ปีที่แล้ว

      @ cool cool😁😁

  • @Macintosch1000
    @Macintosch1000 ปีที่แล้ว

    can you recommend a profitable EA for beginners?

    •  ปีที่แล้ว

      No I am sorry but I cannot see the future (unfortunately :/)

  • @DJStoneSteenkamp_za
    @DJStoneSteenkamp_za ปีที่แล้ว

    Where can i contact you please.