Structuring code into files

This commit is contained in:
Bell
2026-03-10 13:47:42 +07:00
parent 3591694c96
commit 1ddb802480
22 changed files with 1766 additions and 1416 deletions
+25
View File
@@ -0,0 +1,25 @@
#ifndef EA_ICT_CL__SESSIONS_MQH
#define EA_ICT_CL__SESSIONS_MQH
// Module: Sessions
// Time/session filters live here (UTC-based if your EA uses UTC inputs).
inline bool IsHourInRange(const int hour, const int start_hour, const int end_hour)
{
// Handles normal and overnight windows:
// - start < end: [start, end)
// - start > end: [start, 24) U [0, end)
if (start_hour == end_hour) return true;
if (start_hour < end_hour) return (hour >= start_hour && hour < end_hour);
return (hour >= start_hour || hour < end_hour);
}
inline int GetUTCHour(const datetime t)
{
MqlDateTime dt;
TimeToStruct(t, dt);
return dt.hour;
}
#endif // EA_ICT_CL__SESSIONS_MQH