Late trade execution, EA on MT4 VPS

 
I’d like some feedback on a problem I’m seeing with an EA with delayed execution trading on the MT4 VPS


The EA has very simple entry rules: 

- The EA should place a “market order” at the open of the 17:00 (NY 10:00) 1 hour candle, if the RSI condition is met 
- The RSI indicator, length 15, condition is above 70 BUY. If it is below 30 SELL.
- The EA can only open a trade between 1700-1800 server time
- Run on a 1h GBPJPY chart. This isn’t a scalping strategy. Minor slippage, spread, latency shouldn’t be an issue
- Note: There is no .dll, There are no cycles or other restrictions to entry


Up until 2022.07.01 the EA traded from the VPS without any noticeable problem. All the trades were executed within 1 second of the candle open. I think this should be sufficient to demonstrate that the EA is working correctly and not at fault.

See the Trade history
  

From 2022.07.01, none of the trades were executed at the open of the candle. All trades were executed 1-27 minutes after the open. I've checked manually that, in all of the above trades the RSI entry criteria was met at the close of the 16:00 1 hour candle.

Unfortunately/coincidently? there are no hosting logs prior to 2022.07.02. To see what was changed. 

The log for 2022.07.02 says the terminal was restarted on the VPS, and the hosted instance was reloaded:

Compared to the log file from the day when the VPS was last synchronized 6 months prior on 2021.12.15, I note the MT4 build number changed from build 1350 to 1356. Now, I understand that the platform will be updated periodically, but has this caused EA to function incorrectly from that time?


To show one example; a recent trade 2023.02.28 17:11:35

At the close of the 16:00, the RSI value is near 80, well above the trade criteria of >70. The 17:00 candle opens at 165.88. With the entry criteria satisfied.


But the EA on the VPS does not place the trade with the broker until 17:11:32 (log time 16:11). The broker executes the trade and returns it within a 3 seconds. So the broker is not at fault.

Checking the 5 minute chart to see how the volatility was at the time of entry. Red arrow indicates the 17:00 candle, and the red line is the traded price of 165.657. The market appears to be fairly normal, trading above and below the expected entry level of the 17:00 candle open at 165.879. 


I should note, it doesn't appear to be a daylight saving time issue. 


Can anyone explain why this would have changed, with no external input/changes sent to the VPS? 

I expect the suggestion will be to, resynchronize the EA (which I am going to do) and hope for the best. But “hope" shouldn’t be a part of trading!


Thanks, in advance

I’ll follow on with a separate comment as there also appears to be trades missed by the EA (only after July 2022....)

 

Following on from the above problems:

It looks like the EA is also missing trades. As before, it only seems to have missed trades after July 2022. Backtesting shows that same results as live trading from Nov 2021 to June 2022, but after 2022.07.01 there are 4 missed trades, up until Nov 2022

An example, 2022.09.23, there should have been a trade that looked like this:

The candle prior to 17:00, closed with RSI =27.7 (below the required 30). There should have been a trade opened.

There is nothing to note in the hosting log from that day/time:

Again, it would be great if someone can explain why the EA is behaving differently to the initial 6 months that it traded.

 

Thanks in advance

 

Please don't post randomly in any section. Your question is not related to the section you posted.

MT4/mql4 has it's own section on the forum.

I have moved your topic to the correct section later, please don't create an other topic.