CExecutionSafety는 네트워크 또는 체결 조건이 좋지 않은 상태에서 전문가 어드바이저가 거래를 체결하지 못하도록 보호하도록 설계된 경량 MQL5 포함 클래스입니다.
실시간 터미널 핑과 실제 벽시계 실행 지연이라는 두 가지 지연 요소를 측정하고, 두 요소의 합산 값이 구성 가능한 임계값을 초과하면 거래 시도를 차단합니다.
대부분의 EA는 네트워크 조건에 관계없이 맹목적으로 실행됩니다. 중요한 주문 중에 핑 또는 브로커 측의 체결 지연이 급증하면 슬리피지, 재호가 또는 체결 실패가 발생할 수 있습니다.
CExecutionSafety는 조건이 악화될 때 체결을 방지하는 사전 거래 안전 게이트를 도입합니다.
이 클래스는 두 가지 데이터 소스를 사용합니다:
이 두 값은 합산되어 구성된 임계값과 비교됩니다. 합산된 지연 시간이 임계값을 초과하면 CheckExecutionSafety()는 false를 반환하고 진단 로그 항목을 인쇄합니다.

터미널에 서버 연결이 없는 경우 TERMINAL_PING_LAST는 -1을 반환합니다. 이 클래스는 이를 감지하고 자동으로 거짓을 반환하여 연결이 끊긴 터미널에서 거래 시도를 방지합니다.
파일을 포함시키고 EA에 클래스를 인스턴스화합니다:
#include <DeeFX/CExecutionSafety.mqh> CExecutionSafety safety; int OnInit() { safety.Init(150); // 150ms combined threshold return INIT_SUCCEED; } void OnTick() { if(!safety.CheckExecutionSafety()) return; ulong t0 = GetTickCount64(); trade.PositionClose(ticket); safety.RecordExecDelay(GetTickCount64() - t0); }
대시보드 표시 또는 외부 로직에 사용할 수 있는 읽기 전용 접근자는 다음과 같습니다:
MetaQuotes Ltd에서 영어로 번역함.
원본 코드: https://www.mql5.com/en/code/70033
Institutional Unmitigated Order Block Matrix
A dynamic Smart Money utility that identifies institutional Order Blocks backed by volume anomalies and automatically tracks their mitigation state to keep your charts clean and focused on fresh liquidity.
Institutional Toxic Flow and Tick Speedometer
A high-frequency trading utility designed to measure real-time tick velocity and detect toxic order flow spikes before they reflect entirely on standard price candles.
Institutional Cumulative Volume Delta (CVD)
An advanced order flow engine that approximates tick-by-tick aggressor data to calculate the true Cumulative Volume Delta, it exposes institutional absorption and divergence hidden within standard price candles.
ASQ Divergence Detector
ASQ Divergence Detector scans your chart for regular and hidden RSI divergences and marks them with color-coded, non-repaint arrows.