MT4 Expert to apply an Automatic Stop Loss

Поделиться
HTML-код
  • Опубликовано: 18 ноя 2024

Комментарии • 134

  • @boldsports6989
    @boldsports6989 Год назад +1

    Thank you so much sir. I went to your website and copied the code. Now I have auto Stoploss setup for when I scalp crude oil

  • @adendenhof3802
    @adendenhof3802 Год назад

    ill need to come back to this video when i have a better grasp of mql4... i see how this can be very helpful but i was lost pretty quick... will come back when i know the language.. thank you

  • @vegardaamot6980
    @vegardaamot6980 Год назад +1

    Thank you so much!! :) Wish this also could be used in the mobile app.. Have a great weekend :)

  • @jkd82
    @jkd82 2 года назад +1

    This could save me a small fortune! I really enjoy trading the DOW but need to place scalps very quickly, so I have not time to enter SL. Anyway, I followed the video, copied the code and it works perfectly! thank you, this is very much appreciated!

  • @jerinpeter243
    @jerinpeter243 Год назад +3

    I am grateful for the effort you are putting into help people like me. This was just what I was looking for. Thank You

  • @sdvogo1520
    @sdvogo1520 3 года назад

    Man you're the best. I searched all over the internet to get recent tutorials for mql4 but they are all outdated. Really thank you. You saved me

    • @OrchardForex
      @OrchardForex  3 года назад +1

      Glad to hear that

    • @jefffernandez7814
      @jefffernandez7814 3 года назад

      Investing successfully in forex require the expertise of a professional broker that is why I have made profit since I started trading with Mr Mathew is the best.

  • @deepsleepaddict1220
    @deepsleepaddict1220 3 года назад

    Thank you very much sir, i tried a couple but they all didn't work.
    This one is a gem! God bless you!

  • @hpt08
    @hpt08 2 года назад

    Brilliant. Couldn't find this in the market place so many thanks. 👍👍

  • @MichaelHall-fj4px
    @MichaelHall-fj4px 6 месяцев назад

    Thank you for this content. Any Chance you could show me how to use on one symbol only? I'm not sure exactly where or how to write the "if order symbol = symbol. Thank you!

  • @IanKayCey
    @IanKayCey 2 года назад +2

    Hi Andrew, I've watched this video a couple of weeks a go, and I was struggling to keep up.
    But, I've learned a lot, practiced programming and I am able to understand your coding today
    The fact that I wasn't able to keep up with you was my motivation, so I am thankful to you Andrew.
    Just hope I can keep up with more advances stuff. Lolz
    Cheers.

  • @ChargeUPFinancial
    @ChargeUPFinancial 3 года назад +2

    Hello sir .... I swear you're the best in this industry
    Complex & explainable in the same time
    Thank you so much &
    Please we need more video

  • @pm5418
    @pm5418 3 года назад +1

    Thanks for the detailed instructions! I noticed that the code you have linked here on the description has errors. I was however able to fix it by copying exactly how you have written it on this video. Thanks again!

    • @OrchardForex
      @OrchardForex  3 года назад +1

      Thanks for letting me know. Sometimes the web page decides to insert & and gt; instead of & and >. Was that the problem? If not then please let me know the error so I can correct it.

    • @pm5418
      @pm5418 3 года назад

      @@OrchardForex Yes, that was it.

    • @pm5418
      @pm5418 3 года назад

      @@OrchardForex can you write something for profit taking? Is there anyway we can do 2 or 3 partial close orders automatically?

    • @xyz8690
      @xyz8690 3 года назад

      @Orchard Forex Thank you. I'm experiencing a similar problem. I also took the initiative to copy and paste the code from this video, as the code on the website had errors.
      Although the code successfully compiled after it was copied from the video, had no errors, and appeared like it was ready for use, it didn't work when tested live on the market.
      Please can you equip the auto stop loss file in the description of this video, or update the code on your website. Would be appreciated👍

    • @OrchardForex
      @OrchardForex  3 года назад +1

      @@xyz8690 Can you explain further what you mean by didn't work. This is nto a similar problem as P M stated the code from the video works but copied from the web does not where you say code from the video does not work. Apart form the issue with the web replacing & and > the code on both is the same. I am happy to help but need more information than doesn't work.

  • @BuKhalid81
    @BuKhalid81 2 года назад

    Hello, that’s awesome thanks for the EA, only one tiny problem I have, it doesn’t apply SL on the first order, only on second order onwards?

    • @BuKhalid81
      @BuKhalid81 2 года назад

      sorry my bad, i didn't put the = sign (i>=0)

  • @michaelpetereffinger
    @michaelpetereffinger 2 года назад

    I love this video! Made my new coding pratices much easier. Can't wait to learn more from you!

  • @cc654727
    @cc654727 3 года назад

    Thank you for you video. I wanted to know if its possible to program an auto stop loss to the low of day?

    • @OrchardForex
      @OrchardForex  3 года назад +1

      Yes. Just use iLow() for the daily timeframe to get the low for today or yesterday.

  • @jacoblindberg2987
    @jacoblindberg2987 Год назад

    Hello, I wrote this out on FTMO meta editor. I am 100% sure that I wrote it all out properly. However when click the compile button at the very end of your video I see no report at all? What do i do to get around this?

  • @Sarah-vs-Hagar
    @Sarah-vs-Hagar 2 года назад

    thanks for the video. I only wish you would have followed up in how to add the script after you completed it. I am new and have no idea how to apply the AutoStop.

  • @ratauramoilane
    @ratauramoilane 6 месяцев назад

    can someone help me out, i have an expert advisor that is not setting the stop loss can i use this EA together with my EA to set stoploss and take profit?

  • @Corralon_Martinto
    @Corralon_Martinto 2 года назад

    Is it possible to make an automatic daily loss that closes all positions? Great job

  • @playerjohnson
    @playerjohnson Год назад

    Hi, how would I prevent manual trade for a buy if it is below current open price and for a sell if current price is above current bars opening price and sound an alarm, many thanks in advance

    • @OrchardForex
      @OrchardForex  Год назад

      You can't prevent manual trades. And that is not what this video is about.

  • @adeshsaroha
    @adeshsaroha 2 года назад

    Hello this also works with pending order also.

  • @joselinegarrido8294
    @joselinegarrido8294 Год назад

    Hi how can we add a trailing stop or B/E feature to this type of stop loss code?

    • @OrchardForex
      @OrchardForex  Год назад

      It's a change to the operation of the code. This code only looks for new trades. To use a TS you have to look at every trade continuously

  • @Pndhy-vc4lp
    @Pndhy-vc4lp 11 месяцев назад

    Can't seem to get the Stop loss to trigger. The code compiled. I've enabled live trading for the EA.

    • @Pndhy-vc4lp
      @Pndhy-vc4lp 11 месяцев назад

      Maybe it's because I'm testing it in BTCUSD on Saturday morning. I'll try when Forex market opens I guess

  • @makeit707
    @makeit707 2 года назад

    Is it possible to add a stop loss to look at a buffers value? Which is actually a previous candles value

    • @OrchardForex
      @OrchardForex  2 года назад

      Buffers have all bar values, just use the bar number you need.

  • @funaayappaji
    @funaayappaji 2 года назад

    Sir
    It's a perfect video.
    Can you please teach how put stop loss for pending orders?

    • @OrchardForex
      @OrchardForex  2 года назад

      It's the same, just change the order type check.

    • @funaayappaji
      @funaayappaji 2 года назад

      @@OrchardForex
      its working when i put pending order
      but its not working when EA put pending order
      Please help me

    • @arthurmcalister1454
      @arthurmcalister1454 2 года назад

      @@funaayappaji I was clear in the video this code is to watch for manual trades and you will have to modify the magic number to work with auto trades.

    • @funaayappaji
      @funaayappaji 2 года назад

      @@arthurmcalister1454
      if (OrderMagicNumber()==33331 && OrderStopLoss()==33331
      am using this magicNumber but it's not working
      can you please help me

    • @OrchardForex
      @OrchardForex  2 года назад

      @@funaayappaji Don't compare the magic number to the stop loss.

  • @velosapien
    @velosapien 2 года назад

    Thank you
    You are a lifesaver.
    If I use this with a robot/ea, do I have to add the magic number?
    Thanks in advance.
    Happy new year to you

    • @OrchardForex
      @OrchardForex  2 года назад +1

      Yes, this looks for manual trades that have magic number zero. If you want to apply to an existing EA you have to look for the magic numbers used by that EA.

  • @2007779
    @2007779 Год назад

    If I applied this EA on one chart would it set stop-losses any any chart open? I’m trying to see if I could run an EA for bot trading and this EA for stop losses

    • @OrchardForex
      @OrchardForex  Год назад

      I haven't looked at this for a while but you would need to set it to look at all symbols and any magic numbers your EA uses.

  • @nomadchad5733
    @nomadchad5733 Год назад

    Thank you so much for all your work, absolutely brilliant.

  • @playingthetrade7180
    @playingthetrade7180 11 месяцев назад

    Where do I download from?

  • @MrPinzonJohn
    @MrPinzonJohn 3 года назад +1

    Hello Sir.
    This is awesome, this EA works perfect!
    Thank you for the video!

    • @OrchardForex
      @OrchardForex  3 года назад +1

      You're welcome!

    • @saravananbhojan8750
      @saravananbhojan8750 2 года назад

      for me i can place trade but SL not updating how this awesome tricks works for you

  • @velosapien
    @velosapien 2 года назад

    How do I add extra magic numbers to this code please. I tried using comma, semicolon, hyphen, extra spaces but still get the compiler error.
    Would I need to add one magic number per line.
    TIA

    • @OrchardForex
      @OrchardForex  2 года назад +1

      You will need multiple magic inputs or input as a string and parse the integer values yourself splitting on the commas

  • @DLuzElAngelMusikal
    @DLuzElAngelMusikal Год назад

    Does it work in combination with other EA's?

  • @zeezee6624
    @zeezee6624 3 года назад +1

    Hello this is a huge help thank you very much however sir. I want to put my stop loss as a 1.5% risk each trade how can I do this and what should I do on input? Thank you.

    • @zeezee6624
      @zeezee6624 3 года назад +1

      Instead of 500 points or (50 pips) I would like to use percentage stop loss, any help what to put on the code? Thank you again ^^

  • @Pyxhel
    @Pyxhel 2 года назад

    Wow thanks, it works perfectly !

  • @mehave.hajveri.Mehavemughal
    @mehave.hajveri.Mehavemughal 3 года назад

    Nice good ,sir next video make please histore trade i means perivus lot to multiply lot factor next trade

  • @rkonathala
    @rkonathala 2 года назад

    What's this different from MT4 Trailing stop ?

    • @OrchardForex
      @OrchardForex  2 года назад

      Trailing stop is no different but many of the statements used in the code differ.

  • @JOYTECHSoumitrapathakkingboss
    @JOYTECHSoumitrapathakkingboss Год назад

    how to get tp also

    • @OrchardForex
      @OrchardForex  Год назад

      It would be the same but reverse calculation

  • @colescott296
    @colescott296 3 года назад +1

    Hello, Thank you for the video, great stuff.
    A question, is it possible to do the same with 'take profit' as well? If so, would you happen to have any advise on how this might look? I appreciate your time!

    • @OrchardForex
      @OrchardForex  3 года назад +1

      Yes, just reverse the > or < signs because I assume you want the TP to come in closer, and in the modify call you set the Tp number instead of SL.

    • @colescott296
      @colescott296 3 года назад +1

      @@OrchardForex I appreciate the response, Might this be something in the right direction? (utilizing the standard EA template)
      input int InpTakeProfitPoints = 2000; // Take profit in points
      datetime checkTime = TimeCurrent()-30; // Only looking at trades in last 30 seconds
      int cnt = OrdersTotal();
      for (int i=cnt-1; icheckTime) { // lets you override after 30 seconds
      double takeProfit = InpTakeProfitPoints*SymbolInfoDouble(OrderSymbol(), SYMBOL_POINT);
      double takeProfitPrice = (OrderType()==ORDER_TYPE_BUY) ?
      OrderOpenPrice()-takeProfit :
      OrderOpenPrice()+takeProfit;
      takeProfitPrice = NormalizeDouble(takeProfitPrice, (int)SymbolInfoInteger(OrderSymbol(), SYMBOL_DIGITS));
      if (OrderModify(OrderTicket(), OrderOpenPrice(), takeProfitPrice, OrderStopLoss(), OrderExpiration())) {}

    • @fizx1454
      @fizx1454 2 года назад

      @@colescott296 Heelo! Did you every get the chance of the take profit code to work? Like the one above that youve posted. Thank you!!

  • @yemiks
    @yemiks 2 года назад

    Hello, please does this work as a trailing stop loss?

    • @OrchardForex
      @OrchardForex  2 года назад +1

      No it works as described in the video

  • @sunl0unger
    @sunl0unger Год назад

    Its not working for me :(
    I have :-( sad face at the top right corner and nothing happens

    • @OrchardForex
      @OrchardForex  Год назад

      Sad face means that you have disabled auto trading in your terminal

  • @RS-sd4cr
    @RS-sd4cr Год назад

    Amazing! Thanks

  • @Mystery-Unveiled
    @Mystery-Unveiled Год назад

    THANK YOU SO MUCH

  • @masoudkazemi2645
    @masoudkazemi2645 2 года назад

    Thank you very much, helped me a lot.

  • @kelvinmazula9189
    @kelvinmazula9189 2 года назад

    This is a very nice video tutorial, but could you please write MT5 EXPERT TO APPLY AN AUTOMATIC STOP LOSS

    • @OrchardForex
      @OrchardForex  2 года назад

      Did you try searching. ruclips.net/video/bBFe2uyCiFE/видео.html

  • @__SanderB
    @__SanderB 2 года назад

    Thanks for sharing this!

  • @hioube
    @hioube 2 года назад

    is it possible to activate the trailing at the same time?

    • @OrchardForex
      @OrchardForex  2 года назад

      What do you mean "activate". You could add a trailing stop routine to this if you want to.

    • @hioube
      @hioube 2 года назад

      @@OrchardForex yes that's what I mean, but don't know how to do. But it's possible, then. Thank you )))

  • @kamariyoung7981
    @kamariyoung7981 3 года назад

    For some reason MT4 isn't allowing me to attach the EA

    • @OrchardForex
      @OrchardForex  3 года назад

      You should attach more detail like the log message instead of just saying it doesn't work. It probably didn't compile

    • @kamariyoung7981
      @kamariyoung7981 3 года назад

      @@OrchardForex Thanks for your help👍🏾

  • @tomato513
    @tomato513 3 года назад

    How do i write the code if i want to use multiple magic numbers?

    • @OrchardForex
      @OrchardForex  3 года назад

      You could try a comma separated list

  • @MohammadAli-hf2id
    @MohammadAli-hf2id 2 года назад

    Dear Sir, It missing SL and TP In some order, This is not working properly, Can you please check the reason? can you help me?

    • @OrchardForex
      @OrchardForex  2 года назад

      This doesn't place TP at all. I think you have the wrong code.

  • @RidleyS79
    @RidleyS79 3 года назад

    Hi,
    Thanks for sharing!
    It's a truly useful tool but after I've saved different versions of it with different S/L-s led to the situation that opening multiple positions on the same FXpair ended up with different SL levels. I couldn't figure what determined which level it would use, I had 5 different versions. The bug remained even after I closed the tab and started from scratch. Any idea how to fix it?
    Shall I put them into separate folders too, or what?
    Thanks in advance!

    • @OrchardForex
      @OrchardForex  3 года назад

      The ea looks for any trade opened manually. You cannot run more than one copy on your account, even on different windows. If you try to run more than one the sl will be set by the one that gets there first.

    • @DedSec44
      @DedSec44 2 года назад

      @@OrchardForex is there a way to make this code to place stop on all orders opened by another EA? I'm on mt4 and i tried to change the magic on your code from zero to 142 (random number) and i configured my other EA to open all orders using that magic number=142 but that experiment did not work

  • @PhantomKid2011
    @PhantomKid2011 3 года назад

    Hi Sir, the download link appears to be broken, do you have a new fixed link?

    • @OrchardForex
      @OrchardForex  3 года назад

      There is no download, just a page where you can copy the code

  • @shahinsinv
    @shahinsinv 3 года назад

    Hello Sir, Thank you for this Auto stop video. I want to like to Please make a video for Auto Trend Line and Auto Trailing Video.

    • @OrchardForex
      @OrchardForex  3 года назад +2

      Trailing stop is next week's video

    • @jefffernandez7814
      @jefffernandez7814 3 года назад

      Investing successfully in forex require the expertise of a professional broker that is why I have made profit since I started trading with Mr Mathew is the best.

  • @trader9926
    @trader9926 3 года назад

    How did you get so good at this you’re a god

    • @OrchardForex
      @OrchardForex  3 года назад +1

      Not good, just persistent. Thank you

    • @jefffernandez7814
      @jefffernandez7814 3 года назад

      Investing successfully in forex require the expertise of a professional broker that is why I have made profit since I started trading with Mr Mathew is the best.

  • @abuislam3634
    @abuislam3634 3 года назад

    Can i use MT4 on 64 bit windows with this ?

  • @tanvietho321
    @tanvietho321 3 года назад

    Thanks a lot, SIR.

  • @khalilcarter1605
    @khalilcarter1605 3 года назад

    Good day. I'm a newbie into programming and I'd like to make an function that limits orders instead of using OrdersTotal, I wanna make an function that limits a certain pair only and also a function that says for this pair, there should be one buy trade and one sell trade. And still be able to open trades on other pairs but also limit them using the same function.
    Eg. OrdersThisPair

  • @hanselesper7435
    @hanselesper7435 Год назад

    what about a automatic take profit

    • @OrchardForex
      @OrchardForex  Год назад

      Just apply the same technique to a take profit.

  • @ytydrtw4t
    @ytydrtw4t 3 года назад

    God bless you!

  • @matthewsodetola9359
    @matthewsodetola9359 3 года назад

    Thank you sir!

  • @muralk3153
    @muralk3153 3 года назад

    Once again excellent video,

    • @OrchardForex
      @OrchardForex  3 года назад

      Thanks again!

    • @jefffernandez7814
      @jefffernandez7814 3 года назад

      Investing successfully in forex require the expertise of a professional broker that is why I have made profit since I started trading with Mr Mathew is the best.

  • @investmentgeniusacademy8668
    @investmentgeniusacademy8668 2 года назад

    I just sent you an email/message concerning a custom expert advisor for MT4 similar to the one in the video with just a couple more additions.I would love to hear back from you.

  • @Chromosome11
    @Chromosome11 3 года назад

    very preciate, 👍

  • @3mercadosemum184
    @3mercadosemum184 2 года назад

    very good bro thanks
    i need take profit please send to me a codec

    • @OrchardForex
      @OrchardForex  2 года назад

      I don't have anything similar with take profit.

  • @jason-ub8qz
    @jason-ub8qz Год назад

    thanks man i really appritaite it i needed such ea

  • @mhlanguages5899
    @mhlanguages5899 3 года назад

    Thank you sir!