Auto close function

 
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.
 

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

 
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?
 
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!

 
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
 
  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.