Automate any Trailing Stop in MT5 Using This Simple Program | mql5 Programming Tutorial

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

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

  • @anm_yoga
    @anm_yoga 9 หลายเดือนก่อน +5

    Man you explain so well, just because of it, I will buy your course, you are a good teacher!

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

      You will like it ;) Have fun learning and programming :)

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

    i think you are just only one youtuber who actually make useful mq5 videos that can be understand by non coding back ground person like me
    there are other great mentors but they just copy pasting and not explaining program at all
    please keep uploading my humble request to you🙏🙏🙏🙏

    •  2 ปีที่แล้ว

      Thank youuu! :) I am glad that you like the content ☺️

  • @_mrmaks
    @_mrmaks 7 หลายเดือนก่อน +1

    This is the best video I’ve seen on trailing stop. You explain so well!! Thank you so much and keep up the good work. I do have a couple of questions I believe I’ll ask as I continue on my journey/ continue to follow your channel and content. 🎉

  • @waydeschneider1234
    @waydeschneider1234 2 ปีที่แล้ว +4

    Great video. Learned a lot. I would like to see a video with multiple take partials on a trade, like 60%, then the remainder at 50% of what’s left and then another at 50% of what’s left etc, until the trade closes out. I think this video combined with take partials would give us beginners some great frame work. Thanks for sharing!

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

    Thank you Rene, I'm just starting out with MQL5 and you are an incredible teacher

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

    hey, i am been an hardcore follower of yours, some day i will soon get to meet you. i still found the loop a bit confusing but by god as my witness alll our videos are simple and everynow and then you pull in some high level task with easy to understand and can even make it look like its nothing. i wish to build an EA and the first person i want to share it to, i you. just will all my love for you. insha'Allah, gimme 2 weeks, with the help of all your videos i will build you one, and make you proud

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

      Thanks for hardcore following! Just keep up the good work and you will get there :)

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

    Great work Rene, thank you so much for taking the time and sharing your knowledge. 93 more videos to go!

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

    Best video in mq5 coding history👍

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

    Thank you very much for all your hard 🙏 work. I look forward to attempting to learn mql5 more with you!

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

    Thanks Rene, this video on coding trailing stops is quite comprehensive.

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

    A very good tutorial! Just what I was looking for. Thank you very much!

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

    Thanks mate for some insights. Always on point and very educative materials.

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

    Great Lesson, busy incorporating it in my EA.....Thanks

  • @wilmontclementson9351
    @wilmontclementson9351 2 ปีที่แล้ว

    Awesome. This video comes at just the right time for me. Will be coding up my TSL tonight with maybe an ATR based option added. Thanks again

    •  2 ปีที่แล้ว

      Great to hear that you are already planning modifications :)

  • @kenyapuzzle_lifeontop5049
    @kenyapuzzle_lifeontop5049 2 ปีที่แล้ว

    best instructor of all time.

  • @tushardesai256
    @tushardesai256 2 ปีที่แล้ว

    Man.. I was just hoping for you to do this video. It's a huge help!

  • @user-rw3me5ve8p
    @user-rw3me5ve8p 6 หลายเดือนก่อน

    Thank you Rene! This is super useful and needed content 😁

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

    Hello, thanks for your tutorials on mql programming. They have been very helpful.

  • @michaelpetereffinger
    @michaelpetereffinger 2 ปีที่แล้ว

    I like the way you've explained this. It helped me to see what l have learned previously is making a lot of sense to me. Keep up the good work!

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

    Great video. Learned a lot. Thanks.😃

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

    As always, I really appreciate your tutorials because you take the trouble to explain every line (except those that you have explained before in other videos) and what each line does in the code.
    BTW, shouldn't you also Normalize the bid and ask prices in lines 37 and 38 to the chart symbol's number of digits? Example:-
    Line 37 double bid = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_BID), _Digits);
    Line 38 double ask = NormalizeDouble(SymbolInfoDouble(_Symbol, SYMBOL_ASK), _Digits);

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

    Thank you Rene. Yuo teach so so good.

  • @pierre-yvespalin1073
    @pierre-yvespalin1073 ปีที่แล้ว +1

    Excellent explanation, thanks a lot ;)

  • @daniel-tm1qc
    @daniel-tm1qc 8 หลายเดือนก่อน

    Thank you Rene - you are awesome

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

      :)

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

    Thanks René, excelent explanation.

  • @frezers78
    @frezers78 2 ปีที่แล้ว

    thanks for the sharing... learnt a new EA from you is a big thing for me... thanks again !!! Awesome info broo

  • @b.r.1222
    @b.r.1222 2 ปีที่แล้ว

    Hi Rene, thank you for the great videos! Fantastic job!

  • @andrewforrest7633
    @andrewforrest7633 2 ปีที่แล้ว

    As usual great coding teaching, great app

  • @peshrawabm5314
    @peshrawabm5314 2 ปีที่แล้ว

    You are the best. Thank you for your hard work.

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

    Thank you . This is so good coding video.

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

    Thank you bro

  • @AyodejiDavid-t2o
    @AyodejiDavid-t2o ปีที่แล้ว

    thank you, this was really helpful

  • @Island_Algorithms
    @Island_Algorithms 2 ปีที่แล้ว

    Thanks once again. Its very much appreciated

  • @villangamingyt7731
    @villangamingyt7731 2 ปีที่แล้ว

    Thank you bro for most helpful videos 😃😃😃

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

    I would like to see how you code a trailing sl using parabolic SRA

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

      You will find a video on this channel in which I explain how to get the SAR data. You should watch it. Also if you want to learn more about mql5 programming you can also check out my complete course here: en.bmtrading.de/mt5-masterclass/

  • @momoduzuberu2892
    @momoduzuberu2892 2 ปีที่แล้ว

    Thank you very sir
    Ur videos helps so so much🙂

  • @manesam7389
    @manesam7389 2 ปีที่แล้ว

    Absolutely Great Content Thank You 🙏🙏🙏

  • @speedtnt7591
    @speedtnt7591 2 ปีที่แล้ว

    Hello Man, thanks for your great tutorials...may you make a tutorials on how to make that beautiful menu at the beginning your video ? thanks a lot

    •  2 ปีที่แล้ว

      Hey I am glad you like the videos. I have a full course on mql5 programming where I also show how to make these: en.bmtrading.de/mt5-masterclass/

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

    How do you know that those 2 different traillogics written won't interfere with one another? 1 is trailing the SL by a fixed amount of points when the openprice + X amount of points is larger then Y.
    The other is setting the trailing sl to the MA. Won't this become a problem? using them both at the same time?

  • @Fernanda-uh7iz
    @Fernanda-uh7iz ปีที่แล้ว

    thanks a lot!!!!!

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

    Gracias por compartir, excelente explicación

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

    Good day Rene, this video is helpful and has expanded my curiosity into the following: is it possible to create an ea that sets an automatic SL based on a predefined risk amount (e.g $100) immediately upon opening the trade? and then closes a partial of the same trade of a predefined amount has been reached (eg: at $300 profit, take 33% partial)?

  • @SnowBoy012
    @SnowBoy012 วันที่ผ่านมา

    The Trailing stop is only working on the second buy order, if I'm only having one buy order then there's not going to be a stop loss, but it's working well on sell orders, why?

  • @andrewforrest7633
    @andrewforrest7633 2 ปีที่แล้ว

    Please add modification to enable and disable the trailing stop with a button, same idea as close all trades video.

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

      Hey, I receive a lot of requestes lately and cannot handle all of them. That is why I always recommend to learn the basics. But maybe I can cover this in the future.

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

    there should be a built it function for this

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

    well, that was clear as mud im getting error messages at the last few curly brackets. ive triple checked the code. can you help me out somehow?

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

    Hi Rene, I am having trouble using this code. I modified your code by moving 'Ctrade trade' before the OnInit function, and the trailing didn't work. Do you think this is the main problem? Also, we need to add 'Ctrade' into the Tick function. Thank you

  • @Zails222
    @Zails222 2 ปีที่แล้ว

    Otimo tutorial, parabens pelo conteudo. Obrigado

  • @edwinkipchirchir2407
    @edwinkipchirchir2407 2 ปีที่แล้ว

    Thank you

  • @sasisas786
    @sasisas786 2 ปีที่แล้ว

    thanks for this video

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

    Amazing

  • @TomPaskudnyak
    @TomPaskudnyak 2 ปีที่แล้ว

    Why do you declare CTrade (and other variables) locally within OnTick()? Wouldn't it be more efficient to declare them once as global variables?

    •  2 ปีที่แล้ว

      I usually use the smallest possible scale because it makes the code cleaner and easier to understand. It might be a little more efficient to declare it as a global variable but does it really matter with modern computers? I don't think you will ever notice the difference in speed here ;)

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

    Hello im kinda new to mql5, can you give me suggestion . for example i have 3 open trades with same symbols, entry price and stop loss but different tp's, and i want to modify the stoploss if tp1 is closed. thanks

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

    Can you please add a link to get your code, it will be much easier for the viewer rather than writing all this down from the video.

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

    Why don't use Position.StopLoss() Position.TakeProfit(), Position.Symbol(), etc?

  • @ryanflick521
    @ryanflick521 2 ปีที่แล้ว

    can u show me how to add a trailing stop in the Macd EA

    •  2 ปีที่แล้ว

      Hey, check out the other tutorials on this channel. I explained trailing stops in some of them ;)

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

    i am creating a TDI EA with this automated trailing stop feature, but the one final problem i having is getting the EA to set a stop loss as the Trailing stop wont set a SL unless the trade goes into profit, how can i fix this?

  • @rafaelacairo7219
    @rafaelacairo7219 2 ปีที่แล้ว

    Can you show how to multiply the lotsize after one trade is close?

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

      Hey, thanks for the Idea. Maybe I can do a video about this in the future :)

  • @kampret06
    @kampret06 2 ปีที่แล้ว

    hi Rene, thanks for all the videos, its awesome. i have tried to build my TSL, but i found a problem about the order which has stopped by SL. the order keep appear in the order list thus i can't place a new order while i only set 1 order active on the EA. how do you think to remove the previous active order stopped by SL. thanks

    •  2 ปีที่แล้ว

      Hey, glad you like the videos :) I am not sure if I understand your comment correctly. What do you mean with 'order list'. Is it some kind of array that you use in the EA. Or do you mean the MT5 toolbox? If the position is closed it should move to the history.

    • @kampret06
      @kampret06 2 ปีที่แล้ว

      hi @, i'm still not sure where did i do wrong. my ea just stop making order even if the buy/sell conditions was met after one order was stopped by SL

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

      Hey, do you have some kind of variable that you have to reset first? I am sorry but I cannot say much here without knowing your code.

  • @pauldavince3740
    @pauldavince3740 16 วันที่ผ่านมา

    Nice😂❤link for the code please

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

    Hi. Will it work if converted to an mql4 code?

  • @منوعاتاليوسفي
    @منوعاتاليوسفي 2 ปีที่แล้ว

    hello please if you have .. trailing stop ..mt5..code.. and you sure it work...please send me the cod

    •  2 ปีที่แล้ว

      Bro the video it literally a tutorial for what you are asking for :D just watch it and cover the code ;)

  • @ouadieelouardy1171
    @ouadieelouardy1171 2 ปีที่แล้ว

    Awesome! But why repeating basics in every video ???!

    •  2 ปีที่แล้ว

      Thank you :) It is hard to make tutorials on TH-cam that are suitable for every viewer. That is why I created a complete course with a structured content list. Check it out: en.bmtrading.de/mt5-masterclass/

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

    He Rene,
    Made this EA, but The crazy thing happends .. he doesn't set a trade and I can't see The difference with your code can you help me perhaps ?
    Gruße,

  • @kadoman0
    @kadoman0 2 ปีที่แล้ว

    I am at 31:26 and after pressing compile... There are 2 errors "unbalanced parentheses and unexpected program end"

    •  2 ปีที่แล้ว

      Hey it means that you forgot to close a bracket. Or you closed one and forgot to open it. So you should take another look on your bracket placement ;)

  • @raphaeladedayo7401
    @raphaeladedayo7401 2 ปีที่แล้ว

    Thanks for this. I was able to write the code for MA, ATR and N-Candles High-Low. However, I have a persistent request failed to modify [invalid stops] for my SELL trades and I'm finding it hard to decipher the problem. Is there a way that I can share my codes with you to help review? Many thanks as always.

    •  2 ปีที่แล้ว

      Hey, I am sorry but I cannot offer 1 on 1 support. Just check your code again and rethink all the steps. Invalid stops usually means that there is a problem with some price level (entry, tp or sl). Maybe the planned sl price is below the current market price?

    • @raphaeladedayo7401
      @raphaeladedayo7401 2 ปีที่แล้ว

      @ Okay I'll go through them again. One more question, what line of code can I add to my EA in order to see my EA Name/Description on my closed positions. At present I see the name while the positions are opened but I don't see it again when the positions are closed.

    • @villangamingyt7731
      @villangamingyt7731 2 ปีที่แล้ว

      @rapheal please use print function and check our journal you will figure out by your self...
      Thank me later

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

    Thank you very much for the class. I have a real hard time to make work the TSL in my EA, always have the error: invalid stops. Can I show you my code please?? it's in a function; do you mind?? thanks again for the clasees

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

      I also added to my EA a Break Even functions, witch is almost the same to the TSL, but still, the TSL function keeps bringing error

    •  ปีที่แล้ว

      @@marceloolmedo6304 Have a look at some of my tutorials on the channel and you will learn how to code a trailing stop. Common mistakes are not rounding the new SL value or trying to put the SL too close to the current market price.

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

      @ that was the mistake, now its already working, thank you for your time man, have a great day

  • @PROPHETEMCHAUKE
    @PROPHETEMCHAUKE 2 ปีที่แล้ว

    👍

  • @ryanflick521
    @ryanflick521 2 ปีที่แล้ว

    helloooo

  • @ryanflick521
    @ryanflick521 2 ปีที่แล้ว

    i need ur help

    •  2 ปีที่แล้ว

      Sorry but I cannot provide 1 on 1 support.

  • @ryanflick521
    @ryanflick521 2 ปีที่แล้ว

    watsapp same

  • @algorithmictradingsystems
    @algorithmictradingsystems 2 ปีที่แล้ว

    You have nice website, but everything is on German.

    •  2 ปีที่แล้ว

      Hey, check out en.bmtrading.de ;)

  • @54Trades
    @54Trades 2 ปีที่แล้ว

    I will forever be grateful to you reine ..i am profitable now but still learning your content👏🫡keep posting

  • @chukwuemekao9610
    @chukwuemekao9610 2 ปีที่แล้ว

    Compliments to you Rene for valuable info that you share in your channel always
    Please I wish to know how to contact you in private because I would like you to program an EA for me base on my strategy. Can that be possible?

    •  2 ปีที่แล้ว

      Hey, thanks for the kind words :) Unfortunately I do not offer this service.

  • @lenityforbes5577
    @lenityforbes5577 2 ปีที่แล้ว

    Any whatsapp or telegram to crosscheck my EA?

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

      I am sorry but I do not provide this service.

    • @lenityforbes5577
      @lenityforbes5577 2 ปีที่แล้ว

      @ I managed script am sorted but I wanted EA however I failed to code it

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

      @@lenityforbes5577 Please make sure that you copy everything correctly from the video. If you are interested in a full mql5 course you should check this out: en.bmtrading.de/mt5-masterclass/

    • @lenityforbes5577
      @lenityforbes5577 2 ปีที่แล้ว

      @ I will roll up soon currently am broke trying to automate my strategy first after few rentals I'll have money then join the winning team

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

      @@lenityforbes5577 sounds good keep up the good work :)

  • @edwinkipchirchir2407
    @edwinkipchirchir2407 2 ปีที่แล้ว

    Instagram: instagram.com/rene_bmtrad... , the link is broken.

    •  2 ปีที่แล้ว

      Hey yeah sorry :D It is instagram.com/rene_balke/
      But I am not really active there.

  • @fadhilinsemwa6333
    @fadhilinsemwa6333 2 ปีที่แล้ว

    Very helpful, cheers brother