MT4 Trailing Stop Expert

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

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

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

    God Bless you tremendously, your tutorials have helped me perfect my existing EA with my very poor coding skills.

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

    Works really well. Would you consider doing a similar presentation on moving a stop loss to break even?

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

    Mate, you have awesome content. Thanks.

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

    Thanks So much for your video
    Its really very helpful
    Please add more videos while you're programming so it can help the new programers how to think and arrange their programming steps while they are working on thier expert advisors
    Once again thanks so much

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

    Thank you , this is what I need!

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

    You are amazing.. Thanks for all the videos.. Very much helpful !

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

    Sir, It seem to be working on only Order_type_sell only and doesn't work on Order_type_buy. Please recheck the code again.

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

    hi do you have a code for this for download. thank you.

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

    Thankyou working perfecly

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

    You are a great person thanks a lot

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

    Thank you for this

  • @CJ-ui4tg
    @CJ-ui4tg 2 года назад

    Thank you! Subscribed

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

    I have work but
    why are the buystoploss and selstoploss prices like the ASK/BID price so when profit becomes a plus the trading is immediately active so it doesn't match the expected price

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

      sorry, it turns out I entered the wrong variable "int". when I change to "double" its working thank you very much Mr

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

    I wrote the code correctly, but after it moves the stop, it prints Modifi at every move. Is this normal, or is there a specific error?

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

    Hi There,
    instead calculate the digits, can we just use the built in function "_Digits"??? same as MT5??
    double sellStopLoss = NormalizeDouble(SymbolInfoDouble(symbol,SYMBOL_ASK)+stoploss,_Digits);
    Thanks

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

      Yes, _Digits or Digits() all have the same value if you are only working with the chart symbol. Remember I passed symbol into this function to make it more generic so if you call it with something other than the chart symbol this may not work.

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

    Please, there is any option to change the trailing stop mt4 settings to calculate the trailing stop pips from the entry price not from the initial stop loss price?

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

      No and the inbuilt trailing stop is calculated from the current price, not the inital stop loss.

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

      @@OrchardForex
      So how to make the trailing stop move to specific level above the breakeven?
      For example, I enter but in euro/usd with price 1.1200 and the initial stop-loss is 20 pips 1.1180 the specific level I need the trailing stop move to when triggered is 1.1240
      How I make it and how to make the increment after this level to be each 20 pips not the same value from the initial stop loss to the specific level?

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

    I'm getting an 'ApplyTrailingStop' - function not defined, and an 'ApplyTrailingStop'- function declarations are allowed on global, namespace or class scope only error when I try to call the function ApplyTrailingStop, along with the ApplyTrailingStop function, in the void OnTick section of my EA. I've also tried copying and pasting the code from the link in the description, to avoid typing errors, no luck. Any suggestions?

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

      It sounds like you missed a closing bracket somewhere before the ApplyTrailingStop function.

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

    Hello Sir, if you don't mind, Can you make my EA Trailing stop working on a real account ?. Please let me know where can I send the EA.

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

    Will this also work if you initiate a trade from your phone if you also have mt4 open on your pc?

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

    Awesome video!

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

    Can you do how to add push mobile alert to EA.

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

    THanks you SIR

  • @M.I.S
    @M.I.S 3 года назад

    thank You

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

    Is there a way to count trailing stop messages to server? My broker warned me about hyperactivity, threatening to disable my account. I understand that it is due to EA calculating a trailing stop on every tick. I could not find a solution. Anyone knows if there is a way to count these messages? Journal does not show them. Maybe an indicator that would display the messages count in real time? Or a code to embed in the EA?

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

      If you have trailing stop working correctly it will only change in one direction and you are unlikely to have this problem. You may be trying to set TS even if it is the same as the current value, don't do that. I also suggest adding a tolerance, like don't adjust ts unless it is more than 5 points difference.

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

      @@OrchardForex Thanks, but I am not sure what you mean. Trailing stop I used was in one direction, naturally, and still I got several warnings. They said that the most probable cause was EA, but I used an MT4 built-in TS in what I thought was the most innocent way. It was supposed to be used as I did. I guess that market was going in a favorable direction for an unusually long time and I had too many positions that were not closed before overloading server with messages. So I am looking for a messages feedback, as a first step in adjusting my trades and finding a solution. No clues or indicators on MQL site.

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

      @@miodragmilosavljevic1190 By MT4 built in ts I assume you mean from the terminal you selected the order and then trailing stop. I don't know of anything you can do to slow that down. If you did have a lot of positions open and they all had a ts then maybe that was the cause but the built in trailing stop is not from an expert. If the built in is going to be a problem then you will have to write your own and as I suggested you can add a minimum increment to avoid moving with every point.

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

    Hi, how can I open or execute buystop and sellstop at the same time.

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

      You just have to open 2 different trades. There is no single command to open both at once. If you are thinking of these as OCO for take profit and stop loss then just apply take profit and stop loss at either order open or with modify.

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

      @@OrchardForex thank you very much

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

    i did every thing you said & 0 error, but its seem like nothing heppened

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

      0 errors just means compiled correctly but there could still be an error. Simple things like > instead of < or = instead of == can make all the difference. Standard diagnostics will be to insert print statements in the code at key points and determine where it is not doing what you expect, and look for errors in the logs.

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

    After Creation as you type this part of code give a error -function not defind.
    " CreateTrade(Symbol(), InpVolume, InpMagicNumber, InpTradeComment); "
    any advise please

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

      The function is CreateTrades

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

      @@OrchardForex The error after compiling is ('InpMagicNumber' - undeclared identifier) the coding error is from the web site not from youtube codes.

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

      @@nadimkhalife The code on the web is for the function, not a complete EA. You have to work some things out for yourself.

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

      OrderSend error 138. 😕

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

    Hi,
    MT4 offers two ways to allow users to set the properties, input and extern.
    I notice that you seem to prefer to use input. Can you tell us why this is please?
    Cheers,
    John

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

      Hi, I see you've asked this several times. The difference is not a simple one extern and input will both perform the input function but extern can be used for more. Short answer to why I use input is because input variables cannot be modified later, makes them safe. And so far I have had no need of the other applications for extern.

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

      extern is not an alternative to input. It is something else that just happens to do the same function as input.

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

      @@OrchardForex My apologies for asking it multiple times. I didn't realise that I had.
      John

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

      @@johnskinner3145 no problem

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

    Whenever I try to compile the create trades and applyttrailing stop it says the function is not defined, how do I define it or what do I define it as?

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

      Hard to say without knowing what you have or exactly which function is not defined but the error message will tell you what it is looking for.

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

      @@OrchardForexfrom lines 48-51 it says 'create trades' 'applytrailingstop' and 'stoploss' function not defined those are the only errors i have from it and i copied it the exact same way

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

      @@mikelim4520 The line numbers will depend on the rest of your code so I'm making an assumption based on the nearest line numbers from the video. 'create trades' should be CreateTrades, applytrailingstop should be ApplyTrailingStop and stoploss should be StopLoss.

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

      @@arthurmcalister1454 yes it's the exact same, i just copied it from the video

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

      @@mikelim4520 If it is exactly the same then you would not have an error. You haven't included the exact error message, one of the lines you mention is blank and another is a comment, so I can only guess at your problem. The CreateTrades and ApplyTrailingStop functions are shown immediately after the functions are used, at 7:15 and 9:12. ApplyTrailingStop is also shown on the web page mentioned in the description. StopLoss is not a function and if you are getting an error telling you stoploss is an undefined function then I assume you have added brackets after the variable name, which is not exactly as the video.

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

    Should have added. Conditional upon another event eg a second order hitting take profit.

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

    yes nice to have a clean accent are you aussie ?

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

      Yes I am! Happily living in the harbour city.

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

    Hi can you use this trailing stop on a meta 4 mobile app?

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

      No, you can't run any custom code in the mobile app.

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

      @@OrchardForex thanks for replying

  • @sh.salman
    @sh.salman 3 года назад

    'Symbol_Bid' -improper enumerator cannot be used
    'Symbol_Ask' -improper enumerator cannot be used
    when i compile it. .it gives this error. .plz help

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

      I did not use Symbol_Bid or Symbol_Ask, but you may have added the underscores. You are missing parentheses Symbol_Ask()

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

    🙏

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

    Hamdy Houssien:
    Looking for someone who can make an expert advisor
    with these options

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

    anyone ever tell you that you look like colin powell?

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

      I prefer to think that Colin Powell looks like me

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

      @@OrchardForex right!!! lol

  • @АдыльКасымбеков-г6е

    нема болияптыку, ошангай аитияпканедыку