Dear programmers, please tell me how to recognize a horizontal line on the chart so that the script will open a market order from it at the moment when the price passes this line. How to set this condition? Thanks in advance
This is something to think about. If you disable the entire EA, it may leave already open positions unattended.
In my opinion, we should disable opening of positions, while other blocks should work.
Then put this code before block of new positions opening, after code of check - modification, i.e. between them. If, of course, the ticks and the loss have been set. Otherwise we have to close all open positions on the first Friday bar, i.e. besides return(0) in curly braces insert the code of closing everything that is open.
I did not even think about the open trades, it is always the little things that cause you to slip, probably need to make a pop-up window like close all the trades or not, well, I'll figure it out, thanks for the tip
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
How about this construction: TimeToStr(TimeCurrent(), TIME_MINUTES)?
And this construction : TimeToStr(TimeCurrent(), TIME_MINUTES) What's not to your liking?
>> Thank you. Yes, it is very good.
Please tell me how to stop the Expert Advisor from working on Fridays.
if (TimeDayOfWeek(TimeCurrent()) == 5) {
return(0);
}
if (TimeDayOfWeek(TimeCurrent()) == 5) {
return(0);
}
Thank you
Thank you
This is something to think about. If you disable the whole EA, it may leave already open positions unattended.
IMHO, we should disable the opening of positions and the other blocks should work.
This is something to think about. If you disable the entire EA, it may leave already open positions unattended.
In my opinion, we should disable opening of positions, while other blocks should work.
Then put this code before block of new positions opening, after code of check - modification, i.e. between them. If, of course, the ticks and the loss have been set. Otherwise we have to close all open positions on the first Friday bar, i.e. besides return(0) in curly braces insert the code of closing everything that is open.