Python script stop executing every 3 hours without any error msg

 

Hi all moderators and experts,

I have written a MT5 EA in python, executing on window parallel under iMac M1.

I use schedule function to recursively conduct trading strategies.

The strange thing is the programme runs smoothly without error for most of the time, but, when it comes to 3 hours after it was compiled, it stopped without error and no longer execute the recursive tasks. 

I have checked the (16 GB) ram and cpu, which all has quite a substantial amount of resource left. 

Do you have any idea of why this happen? Any suggestions on how to resolve this or other good ways to keep the function running all time?

Many Thanks !!

******************************************

The code is simple as below. 

schedule.every(10).seconds.do(function)

while 1:

    schedule.run_pending()

    time.sleep(1)

Comparative Analysis of 10 Trend Strategies
Comparative Analysis of 10 Trend Strategies
  • www.mql5.com
The article provides a brief overview of ten trend following strategies, as well as their testing results and comparative analysis. Based on the obtained results, we draw a general conclusion about the appropriateness, advantages and disadvantages of trend following trading.
 
Your topic has been moved to the section: Expert Advisors and Automated Trading — In the future, please consider which section is most appropriate for your query.
MQL5 forum: Expert Advisors and Automated Trading
MQL5 forum: Expert Advisors and Automated Trading
  • www.mql5.com
How to create an Expert Advisor (a trading robot) for Forex trading