Files
Bell-PriceActionWithEma-EA/Experts/EA_ICT_CL/Logging.mqh
T

20 lines
632 B
Plaintext
Raw Normal View History

2026-03-10 13:47:42 +07:00
#ifndef EA_ICT_CL__LOGGING_MQH
2026-03-10 19:28:06 +07:00
#define EA_ICT_CL__LOGGING_MQH // Tránh include trùng
2026-03-10 13:47:42 +07:00
2026-03-10 19:28:06 +07:00
// Module: Logging in log ra Journal khi bật InpDebugLog
2026-03-10 13:47:42 +07:00
inline void LogPrint(const bool enabled, const string msg)
{
2026-03-10 19:28:06 +07:00
if (!enabled) return; // Tắt log thì thoát
Print(msg); // In chuỗi ra Experts/Journal
2026-03-10 13:47:42 +07:00
}
inline void LogPrintF(const bool enabled, const string fmt, const string a0 = "", const string a1 = "", const string a2 = "")
{
2026-03-10 19:28:06 +07:00
if (!enabled) return; // Tắt log thì thoát
Print(StringFormat(fmt, a0, a1, a2)); // Format rồi in (tối đa 3 tham số string)
2026-03-10 13:47:42 +07:00
}
#endif // EA_ICT_CL__LOGGING_MQH