Lag between EA and server
-
Hello!
I'm testing my first EA on a demo account. The EA is that London opening yet discussed here.
It happens something weird in the morning when the robot is activated.
It is supposed to start at 8:00 GMT by an hour filter (active from 8:00 to 8:10 in TF15), then it executes a "once per bar" sequence: identify a price range, trace a rectangle on the graph and, if conditions are ok it places pending orders.
Everything's fine in back test but in the live demo it does everything twice (2 rectangles and 4 pendings): looks like the EA begin to work few seconds before the 8:00 bar is opened... so the once per bar sequence is executed along the last seconds of the 7:45 bar and then again for the correct bar. It's very fast, watching the platform in that moment it seems that actions are simultaneous, but the 2 range rectangles are traced starting from 2 different bars so i'm almost sure that my hypotesis is right.
I can solve this by shifting the hour filter 30 seconds or 1 minute forward but... i'm guessing why this happens.
The hour filter is related to the server time or the local machine time? -
Maybe you have 2 EAs working on the same time?
There is a setting in the block for server/local time
-
@fxDreema yes you're right, i have 2 EA working on the same demo account. The problem can be related to this?
I know about the local/server option but i chose the third one... "GMT", because i hoped to be always in sync with the London session without caring about the server time zone. -
I found out that the VPS time is 5 seconds earlier than broker's time. So that's the reason... and this also means that "GMT" option in the hout filter block is related to the local machine. I will change it to "server" and i'll add a GMT correction constant or... maybe, i guess i can set a formula and a variable to read the market conditions and automatically align the server time to the local machine time
