Download MetaTrader 5

Auto close function

To add comments, please log in or register
sami awan
79
sami awan  
Hello every one,

Since the spread is normally hight within 2 hours before market vlosing on friday and after 2 hours of market opening on monday. So i want my EA to auto close 2 hours before market vlosing and auto start 2 hours after the market opens.
Kindly suggest code for this.
Thanks.
Drazen Penic
2617
Drazen Penic  

Use date and time functions to determine a current day of week and time. 

sami awan
79
sami awan  
drazen64:

Use date and time functions to determine a current day of week and time. 

 


Bro i tried but not working for me. Plz can u write it here in comment?? And shud write it in start function function?
Fernando Carreiro
2201
Fernando Carreiro  
sammiawan999: Bro i tried but not working for me. Plz can u write it here in comment?? And shud write it in start function function?

Asking someone here to do it for you for free is not very polite nor ethical!

Keith Watford
Moderator
10371
Keith Watford  
sammiawan999:

Bro i tried but not working for me. Plz can u write it here in comment?? And shud write it in start function function?
Please write in English, not everyone understands, especially if they are not native English speakers
whroeder1
15335
whroeder1  
  1. Please don't write ur - it's "you are" or "your" - MQL4 forum
  2. "Doesn't work" is meaningless - just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires - meaningless. There are no mind readers here.
  3. You have only three choices: Search for it, learn to code it, or pay someone. We're not going to code it FOR you. We are willing to HELP you when you post your attempt (using SRC) and the nature of your problem.
To add comments, please log in or register