God Bless you tremendously, your tutorials have helped me perfect my existing EA with my very poor coding skills.
@OrchardForex2 жыл бұрын
Great to hear!
@keithdugmore43882 жыл бұрын
Works really well. Would you consider doing a similar presentation on moving a stop loss to break even?
@ChargeUPFinancial3 жыл бұрын
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
@OrchardForex3 жыл бұрын
Thank you, I will
@viniciocoelho3538 Жыл бұрын
Mate, you have awesome content. Thanks.
@andeorjindubuisi71352 жыл бұрын
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.
@coderblog3 жыл бұрын
Thank you , this is what I need!
@spliffli158 Жыл бұрын
Thank you for this
@OrchardForex Жыл бұрын
My pleasure!
@ibingproject2 жыл бұрын
Thankyou working perfecly
@poorvamarkale54162 жыл бұрын
You are amazing.. Thanks for all the videos.. Very much helpful !
@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?
@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 Жыл бұрын
sorry, it turns out I entered the wrong variable "int". when I change to "double" its working thank you very much Mr
@ZHOUKINGS3 жыл бұрын
hi do you have a code for this for download. thank you.
@franciscojunior68413 жыл бұрын
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
@OrchardForex3 жыл бұрын
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.
@simpledz2 жыл бұрын
You are a great person thanks a lot
@topaz7902 жыл бұрын
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.
@CJ-ui4tg2 жыл бұрын
Thank you! Subscribed
@ericbradford35142 жыл бұрын
Will this also work if you initiate a trade from your phone if you also have mt4 open on your pc?
@OrchardForex2 жыл бұрын
yes
@M.I.S3 жыл бұрын
thank You
@khaledahmed58642 жыл бұрын
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?
@OrchardForex2 жыл бұрын
No and the inbuilt trailing stop is calculated from the current price, not the inital stop loss.
@khaledahmed58642 жыл бұрын
@@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?
@tanvietho3213 жыл бұрын
THanks you SIR
@OrchardForex3 жыл бұрын
Welcome.
@johnskinner31453 жыл бұрын
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
@OrchardForex3 жыл бұрын
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.
@OrchardForex3 жыл бұрын
extern is not an alternative to input. It is something else that just happens to do the same function as input.
@johnskinner31453 жыл бұрын
@@OrchardForex My apologies for asking it multiple times. I didn't realise that I had. John
@OrchardForex3 жыл бұрын
@@johnskinner3145 no problem
@jonathanmiles38062 жыл бұрын
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?
@OrchardForex2 жыл бұрын
It sounds like you missed a closing bracket somewhere before the ApplyTrailingStop function.
@josechavarria19273 жыл бұрын
Awesome video!
@OrchardForex3 жыл бұрын
Thanks!
@keithdugmore43882 жыл бұрын
Should have added. Conditional upon another event eg a second order hitting take profit.
@yougchee94183 жыл бұрын
Hi, how can I open or execute buystop and sellstop at the same time.
@OrchardForex3 жыл бұрын
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.
@yougchee94183 жыл бұрын
@@OrchardForex thank you very much
@Chromosome113 жыл бұрын
🙏
@Chromosome113 жыл бұрын
After Creation as you type this part of code give a error -function not defind. " CreateTrade(Symbol(), InpVolume, InpMagicNumber, InpTradeComment); " any advise please
@OrchardForex3 жыл бұрын
The function is CreateTrades
@nadimkhalife3 жыл бұрын
@@OrchardForex The error after compiling is ('InpMagicNumber' - undeclared identifier) the coding error is from the web site not from youtube codes.
@OrchardForex3 жыл бұрын
@@nadimkhalife The code on the web is for the function, not a complete EA. You have to work some things out for yourself.
@emersonmartin27092 жыл бұрын
OrderSend error 138. 😕
@mikelim45203 жыл бұрын
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?
@OrchardForex3 жыл бұрын
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.
@mikelim45203 жыл бұрын
@@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
@arthurmcalister14543 жыл бұрын
@@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.
@mikelim45203 жыл бұрын
@@arthurmcalister1454 yes it's the exact same, i just copied it from the video
@OrchardForex3 жыл бұрын
@@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.
@chbry10503 жыл бұрын
Can you do how to add push mobile alert to EA.
@OrchardForex3 жыл бұрын
That is in our topic backlog
@miodragmilosavljevic11902 жыл бұрын
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?
@OrchardForex2 жыл бұрын
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.
@miodragmilosavljevic11902 жыл бұрын
@@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.
@OrchardForex2 жыл бұрын
@@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.
@eylonashkenazi32182 жыл бұрын
i did every thing you said & 0 error, but its seem like nothing heppened
@OrchardForex2 жыл бұрын
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.
@kasamkhan79733 жыл бұрын
Hi can you use this trailing stop on a meta 4 mobile app?
@OrchardForex3 жыл бұрын
No, you can't run any custom code in the mobile app.
@kasamkhan79733 жыл бұрын
@@OrchardForex thanks for replying
@ronkirby52903 жыл бұрын
yes nice to have a clean accent are you aussie ?
@OrchardForex3 жыл бұрын
Yes I am! Happily living in the harbour city.
@sh.salman3 жыл бұрын
'Symbol_Bid' -improper enumerator cannot be used 'Symbol_Ask' -improper enumerator cannot be used when i compile it. .it gives this error. .plz help
@OrchardForex3 жыл бұрын
I did not use Symbol_Bid or Symbol_Ask, but you may have added the underscores. You are missing parentheses Symbol_Ask()
@kngbeofficial3 жыл бұрын
anyone ever tell you that you look like colin powell?
@OrchardForex3 жыл бұрын
I prefer to think that Colin Powell looks like me
@kngbeofficial3 жыл бұрын
@@OrchardForex right!!! lol
@АдыльКасымбеков-г6е3 жыл бұрын
нема болияптыку, ошангай аитияпканедыку
@btats20207113 жыл бұрын
Hamdy Houssien: Looking for someone who can make an expert advisor with these options