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
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!
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.
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!
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.
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!
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.
@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👍
@@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.
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?
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.
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?
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
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.
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
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
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.
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 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())) {}
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!
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.
@@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
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.
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.
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
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.
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.
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
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
Thank you so much!! :) Wish this also could be used in the mobile app.. Have a great weekend :)
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!
I am grateful for the effort you are putting into help people like me. This was just what I was looking for. Thank You
You are welcome!
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
Glad to hear that
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.
Thank you very much sir, i tried a couple but they all didn't work.
This one is a gem! God bless you!
Brilliant. Couldn't find this in the market place so many thanks. 👍👍
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!
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.
Glad it helped!
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
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!
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.
@@OrchardForex Yes, that was it.
@@OrchardForex can you write something for profit taking? Is there anyway we can do 2 or 3 partial close orders automatically?
@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👍
@@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.
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?
sorry my bad, i didn't put the = sign (i>=0)
I love this video! Made my new coding pratices much easier. Can't wait to learn more from you!
Glad it was helpful!
Thank you for you video. I wanted to know if its possible to program an auto stop loss to the low of day?
Yes. Just use iLow() for the daily timeframe to get the low for today or yesterday.
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?
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.
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?
Is it possible to make an automatic daily loss that closes all positions? Great job
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
You can't prevent manual trades. And that is not what this video is about.
Hello this also works with pending order also.
Hi how can we add a trailing stop or B/E feature to this type of stop loss code?
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
Can't seem to get the Stop loss to trigger. The code compiled. I've enabled live trading for the EA.
Maybe it's because I'm testing it in BTCUSD on Saturday morning. I'll try when Forex market opens I guess
Is it possible to add a stop loss to look at a buffers value? Which is actually a previous candles value
Buffers have all bar values, just use the bar number you need.
Sir
It's a perfect video.
Can you please teach how put stop loss for pending orders?
It's the same, just change the order type check.
@@OrchardForex
its working when i put pending order
but its not working when EA put pending order
Please help me
@@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.
@@arthurmcalister1454
if (OrderMagicNumber()==33331 && OrderStopLoss()==33331
am using this magicNumber but it's not working
can you please help me
@@funaayappaji Don't compare the magic number to the stop loss.
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
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.
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
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.
Thank you so much for all your work, absolutely brilliant.
My pleasure!
Where do I download from?
Hello Sir.
This is awesome, this EA works perfect!
Thank you for the video!
You're welcome!
for me i can place trade but SL not updating how this awesome tricks works for you
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
You will need multiple magic inputs or input as a string and parse the integer values yourself splitting on the commas
Does it work in combination with other EA's?
As long as the other ea isn't also trying to manage the stop loss
@@OrchardForex ok thanks
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.
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 ^^
Wow thanks, it works perfectly !
Glad it helped
Nice good ,sir next video make please histore trade i means perivus lot to multiply lot factor next trade
What's this different from MT4 Trailing stop ?
Trailing stop is no different but many of the statements used in the code differ.
how to get tp also
It would be the same but reverse calculation
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!
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.
@@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())) {}
@@colescott296 Heelo! Did you every get the chance of the take profit code to work? Like the one above that youve posted. Thank you!!
Hello, please does this work as a trailing stop loss?
No it works as described in the video
Its not working for me :(
I have :-( sad face at the top right corner and nothing happens
Sad face means that you have disabled auto trading in your terminal
Amazing! Thanks
Glad you like it!
THANK YOU SO MUCH
You're welcome!
Thank you very much, helped me a lot.
You're welcome!
This is a very nice video tutorial, but could you please write MT5 EXPERT TO APPLY AN AUTOMATIC STOP LOSS
Did you try searching. ruclips.net/video/bBFe2uyCiFE/видео.html
Thanks for sharing this!
My pleasure!
is it possible to activate the trailing at the same time?
What do you mean "activate". You could add a trailing stop routine to this if you want to.
@@OrchardForex yes that's what I mean, but don't know how to do. But it's possible, then. Thank you )))
For some reason MT4 isn't allowing me to attach the EA
You should attach more detail like the log message instead of just saying it doesn't work. It probably didn't compile
@@OrchardForex Thanks for your help👍🏾
How do i write the code if i want to use multiple magic numbers?
You could try a comma separated list
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?
This doesn't place TP at all. I think you have the wrong code.
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!
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.
@@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
Hi Sir, the download link appears to be broken, do you have a new fixed link?
There is no download, just a page where you can copy the code
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.
Trailing stop is next week's video
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.
How did you get so good at this you’re a god
Not good, just persistent. Thank you
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.
Can i use MT4 on 64 bit windows with this ?
Yes, no problem.
Thanks a lot, SIR.
Welcome!
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
what about a automatic take profit
Just apply the same technique to a take profit.
God bless you!
Thank you sir!
No worries!
Once again excellent video,
Thanks again!
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.
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.
very preciate, 👍
very good bro thanks
i need take profit please send to me a codec
I don't have anything similar with take profit.
thanks man i really appritaite it i needed such ea
Enjoy
Thank you sir!