Server Time

unaizams

Newbie
Messages
6
Likes
0
Greetings to all,

1- I am trying to get an EA place a pending order at the beginning of the day daily and get the EA also delete the pending order if not activated by the close of the same day so I included the following code:

//------------------

if(CurTime()==00:00)

//Place the order

//--------------------

if(CurTime()==24:00)

//Delete the order

//---------------------

However, my EA is placing the order at 17:00 hour my broker/server time. My broker is FXCM, New York, USA

So is my programming for the time correct? Is CurTime() retruns my broker/server time or my PC/local time? And if not correct what is the correct code for that?


2- Anothor question for another EA that is supposed to place a market order at a specific signal but failed to do so due to the following reason:

Quote:
2009.03.10 15:03:20 '81002849': order sell 0.10 USDJPY opening at 98.404 sl: 98.677 tp: 95.154 failed [Trade timeout]
2009.03.10 15:00:02 '81002849': request was accepted by server
2009.03.10 15:00:02 '81002849': instant order sell 0.10 USDJPY at 98.404 sl: 98.677 tp: 95.154
Unquote.

Even though I have 3 point slippage.

Appreciate taking the time to answer.
 
Top