How to find the trading session with the MQL5 library on Python?

 
Hi, I would like to know how to know if the market I trade is closed or no currently using the MetaTrader5 library on Python? Any ideas? (The order_check function doesn't detect that the market is closed so it makes me send the order when market closed)

Thanks in advance!
 
Here is the list of all mql5 functions with a short explanation, so that a search for keywords could work.
[Deleted]  
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893