Some questions about Time (data & functions).

 

Hiho!

Some issues that give me a lot of concern. I would be very happy if some could answer them:

1. I want to create an EA that opens p. orders at specific day & hour (let's say Sunday opening). How it should look ? (DayOfWeek==0 && Hour()=00 doesnt work). Whatsmore I would like to open position only once so we should spot only the firs tick on Sunday (tried Seconds()==00 but what if the first tick arrives at 01 ?). Let's suppose that my broker's time is GMT.

2. Let's suppose that we have opened p. order as I want in the first point. Now I want to set its expiration date to Friday last tick (minute). I tried to set expiration date like this CurTime()+432000 (number of seconds in the week, but it didn't work).

3. Do you know any easier way to know what is your broker's time than checking its headquaters location and its time ?

4. Different brokers offer different times. How important is time in a strategy? Is it crucial ? I have noticed taht even in a simple MACD strategy on 1H TF results differs on from another. Maybe someone knows how big is this difference ?

Thanks in advance for your answers.

Best Regards

P7

 

I need your help VERY, VERY badly...

 
pete7:
I need your help VERY, VERY badly...

Pete7,

But try to look at Igorad's EA: SimpleDailyRangeBreakExpert_v1.2.

This EA is having TimeZone (MetaTrader's broker time to open the orders) and days of the week coded. It works in forward testing.

And you may look at 2 EAs from Kimiv.

 

Thanks newdigital

Reason: