My EA Stops working abruptly so frequently

 

Dear All,

I have designed an EA and ran it for a while and it has worked correctly.

The EA is installed on 5 different charts on my MT4 terminal connect to a VPS.

Recently, I noticed the EA has stopped working on one of the chart (BTCUSD symbol) while others are still working. I rebooted the VPS and it resumed working only to stop before the hour candle closses.

I then reattached the EA to reinitialise. It loads successfully but stops working before the close of the hour candle again (I only trade the H1 timeframe).

I tried reinstalling the VPS again. After installation, the same issue is observed on the BTCUSD chart but other charts are working quite okay. 

Finally, I tried it on my personal desktop and it worked just fine on the BTCUSD chart.

I contacted my VPS provider  but they insist I appear online and have no control over my EA operation particularly since it is working fine on other charts.

I am lost right now.

My question is:

1) Why would the EA function properly on other charts but not on the BTCUSD chart on my VPS

)Why would it function properly on the BTCUSD chart with the same settings outside the VPS

Why did it suddenly stop functioning on the VPS BTCUSD chart after running just fine for about 2 months?


Any help will be greatly appreciated.

 
Jude Uvo Akporubere:


Have you tried to reinstall mt4 on the vps? When things like that happen to me, i delete all the hst files and start up mt4 again, and let mt4 download the candles fresh. That seems to fixed all my issues so far.

What other charts do you have it on? Your code might not like cfds. But without you posting your code, we can only make guesses as to the cause. And you will not get any other responses from others unless you post code.

The fact that it is working on other charts suggests that it is coding, not the vps or mt4.

 
Your topic has been moved to the section: MQL4 and MetaTrader 4
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
 
Jude Uvo Akporubere:

1) Why would the EA function properly on other charts but not on the BTCUSD chart on my VPS
)Why would it function properly on the BTCUSD chart with the same settings outside the VPS
Why did it suddenly stop functioning on the VPS BTCUSD chart after running just fine for about 2 months?

Obviously the are "bugs" in the code, most probably due to not properly handling different contract specifications.

Also, given the problem is mostly on a VPS, there may also be improper handling due to lower resource availability such as RAM and CPU usage, or maybe it could be related to network issues.

This obviously is only speculation because you have not shown your code.

You will just have debug your code, by print details to the log at various points of interest in the code, so that you can trace the issue.