[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 21

 
Help to implement a legible time output.
 

How about this construction: TimeToStr(TimeCurrent(), TIME_MINUTES)?

 
xrust >> :

And this construction : TimeToStr(TimeCurrent(), TIME_MINUTES) What's not to your liking?

>> Thank you. Yes, it is very good.

 
Can you please tell me how to make the advisor does not work on Fridays?
 
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
 
Dimoncheg >> :
Please tell me how to stop the Expert Advisor from working on Fridays.

if (TimeDayOfWeek(TimeCurrent()) == 5) {

return(0);

}

 
Reshetov >> :

if (TimeDayOfWeek(TimeCurrent()) == 5) {

return(0);

}


Thank you

 
Dimoncheg >> :

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.

 
granit77 >> :

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
Reason: