트레이딩 세션 제어용 라이브러리. 시작 시에는 주 7일(토요일과 일요일에는 암호화폐 거래가 있을 수 있음) 동안의 거래 세션 시간을 계산하여 하루에 최대 10개의 세션을 계산합니다. 그런 다음 OnTick()에서 확인을 할 수 있으며, 거래 세션 외부에서 틱이 들어온 경우 추가 처리를 종료할 수 있습니다.
다양한 트레이딩 전략의 여러 인스턴스를 결합하는 다중 통화 전문가 어드바이저를 만들기 위해 라이브러리를 개발하는 동안 작성된 소스 코드입니다.
PrintXYZ() 라이브러리를 사용하여 터미널에서 방대한 정보를 인쇄할 수 있습니다.
이 라이브러리는 백테스팅 중에 구성 가능한 손익 임계값에 따라 계좌 잔고를 재설정하여 소품 트레이딩 회사 시나리오를 시뮬레이션하고 분석을 위해 재설정 결과를 기록합니다.
Logify는 EA 및 지표의 디버깅, 추적, 모니터링을 간소화하도록 설계된 MQL용 로깅 라이브러리입니다. 로그 수준, 유연한 형식 및 여러 핸들러를 지원하여 차트나 터미널에서 직접 구조화되고 사용자 지정 가능하며 정리된 로그를 제공합니다. MQL 프로젝트에 쉽게 통합할 수 있는 가볍고 우아한 솔루션입니다.
Include-file class that measures inter-tick latency, filters false alarms via a self-normalising ATR volatility gate, and broadcasts persistent lag alerts to other EAs via GlobalVariable IPC.
Institutional-grade forex session detection and analysis library for MetaTrader 5.
Institutional risk analysis library for MetaTrader 5. Zero external dependencies. Pure MQL5 mathematics.
ASQ Order Executor — Institutional order execution wrapper for MQL5 EAs ASQ Order Executor provides institutional-grade order execution with automatic retry logic, slippage monitoring, partial fill handling, requote management, and comprehensive execution statistics. Drop it into any EA for production-ready trade execution.
A daily process writes "today's decision" (which strategy runs, or FLAT) to a file the EAs read at the open. One day the writer did not run. The EAs read yesterday's file, compared its date with TimeCurrent() - the server clock, which had stepped back to the previous day overnight - saw a match, and traded all morning on a 24-hour-old decision. No error anywhere. Two rules, both in this class: 1) staleness is judged against TimeLocal(), which always moves forward; TimeCurrent() is the last tick's stamp - it freezes without ticks and can step back on reconnect. 2) When in doubt the answer is FLAT: missing file, bad date, wrong day, empty line - every failure path returns "do nothing", and each is logged ONCE per state change, not on every tick and not never. File format: line 1 = ISO date, line 2 = decision string. The demo writes a fresh, a stale, a malformed, an empty and a missing file, and shows that only the first is allowed to trade.
위험 금액을 기준으로 한 포지션 규모는, 가정된 핍(pip) 값이 아닌 해당 종목의 실제 틱 값, 틱 크기 및 거래량 단위를 바탕으로 계산됩니다. 거래량은 항상 아래로 반올림되며, 위험 금액이 최소 랏보다 작을 경우 이를 알리고 해당 랏의 실제 비용을 보고합니다. 터미널 상태가 아니므로 포지션 크기 산정 로직을 오프라인에서 테스트할 수 있으며, 41개의 어설션으로 구성된 테스트 스크립트가 포함되어 있습니다.
A small include file for Expert Advisors and trade managers. It turns your risk rules into yes/no answers: how many lots does this stop allow, is the daily loss limit reached, is the maximum drawdown (static or trailing) reached, how much is at risk across all open positions, and are spread and session acceptable. The lot is never rounded up: if the broker minimum lot would risk more than allowed, the trade is skipped and the reason is returned. Limits survive a terminal restart. The library only measures: it sends no order. Includes a demo account guard (no trading by default) and a self-test with 78 checks.
The library reconstructs a complete MQL4-style order model on top of the native MQL5 Position, Order, Deal, and History APIs. This design allows legacy MQL4 Expert Advisors to operate with minimal code changes while preserving MQL5.
Calculates the Strategy Tester report statistics from the deal history, including Z-Score, AHPR, GHPR, LR Correlation and LR Standard Error, which TesterStatistics() does not return. Checked value by value against the tester.
Minimal include file to license your own EAs and indicators: allowed account numbers, expiry date, demo-only trial mode and broker server filter. Example EA included.
이 EA는 인클루드 파일을 사용하여 자신만의 헤징 전략을 구현하는 방법을 보여주는 데모입니다.
이 코드는 메타트레이더 5에서 거래가 개시 또는 청산될 때마다 모바일 기기로 푸시 알림을 전송하는 간단한 기능을 제공합니다. 이 코드는 네팅 계좌(심볼당 하나의 포지션만 허용)를 위해 설계되었습니다.
기술적 세부 사항 현재 매수/매도 호가로 즉시 시장가 청산을 위해 TRADE_ACTION_DEAL과 함께 MQL5의 OrderSend를 사용합니다. 슬리피지 허용 오차(10포인트), 적절한 거래량 매칭, 매직넘버 보존 기능이 포함되어 있습니다. 실행 중 지수 이동을 방지하기 위해 포지션을 역순으로 반복합니다.
이 스크립트 및 EA를 통해 코더는 MQL5 캘린더를 사용하는 뉴스 기반 전략을 백테스트할 수 있습니다.
거래 작업 전에 터미널 핑 + 실행 대기 시간을 결합하여 검증하는 클래스를 포함합니다. 임계값을 초과하면 false를 반환합니다.
브로커가 어떤 명칭으로 부르든 상관없이 ‘골드’ 심볼을 감지하고, 계약 사양을 임의로 가정하지 않고 터미널에서 직접 읽어오며, 계좌 통화로 표시된 위험 금액을 해당 브로커에 맞는 정확한 랏 크기로 변환합니다.
CDebugLogger 클래스는 MQL4/5 환경에서 사용하도록 설계된 유연하고 포괄적인 로깅 유틸리티입니다. 개발자는 타임스탬프, 함수 서명, 파일 이름, 줄 번호 등을 로그 항목에 포함하는 옵션을 사용하여 다양한 중요도 수준(정보, 경고, 오류, 디버그)으로 메시지를 로깅할 수 있습니다. 이 클래스는 콘솔과 파일 모두에 대한 로깅을 지원하며, 로그를 일반 폴더와 CSV 형식으로 저장할 수 있습니다. 또한 특정 키워드를 기반으로 로그를 무음 처리하여 민감한 정보가 기록되지 않도록 하는 기능도 제공합니다. 이 클래스는 다양한 디버깅 및 모니터링 요구 사항을 충족하는 사용자 지정 가능한 기능을 통해 MQL4/5 애플리케이션에서 강력한 로깅 메커니즘을 구현하려는 개발자에게 이상적입니다.