CIsSession - Class for setting time intervals (sessions) - MetaTrader 5 Library - MT4/MT5 Resources

After watching this course I decided to publish a publication . This topic looks interesting. My method doesn't solve all problems either. Therefore, suggest what areas can be improved.
An example of class usage is similar to this variant . This makes it easier to see the pros and cons.
advantage:

Options to set time
1. Daily meetings . For example, it allows trading within specified time intervals every day. situation:
2. Night meetings. For example, overnight trading is allowed: starts today and ends tomorrow. This is true every day. situation:
3. Within a date range. For example, allow transactions from the session start date to the session end date. situation:
4. Date range exceeded. The session start date is greater than the session end date. Therefore, transactions are allowed before the session end date and after the new session start date. situation:
5. Disable/enable weekday trading. If you want to trade, it is enough to set the working day parameter to "true". or "false" to disable trading.
6. All settings can be changed anywhere in the program using the Init() method.
P.S. This class was created for MetaTrader 5, but it also works in MetaTrader 4. The only difference is that the MetaTrader 4 Strategy Tester does not support interval optimization for datetime formats. But it can be solved by replacing the datetime in the EA input parameters with long.
Attachment download
📎 issession.mqh (10.15 KB)
📎 example_is_session.mq5 (3.13 KB)
Source: MQL5 #14305
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •