MQL5 MetaTrader 5용 소스 코드 라이브러리

icon

라이브러리는 특정 기능을 포함하는 작은 하위 프로그램으로, 새로운 응용 프로그램을 개발하는 데 사용될 수 있습니다. 일단 작성되고 철저히 점검되면, 사용자는 라이브러리를 통해 새로운 MQL5 응용 프로그램의 개발 속도를 높일 수 있습니다. 예시 중 하나는 여러 수치 분석 함수를 포함하는 ALGLIB 라이브러리입니다.

MetaEditor에서 거래전략 개발 시 라이브러리 소스 코드를 다운로드하여 사용할 수 있습니다. 그것들은 MetaTrader 5에서는 독립적으로 실행할 수 없습니다.

코드를 제출하세요

A library for MetaTrader 5 that declares rules between the inputs of an Expert Advisor once in the code. OnInit rejects a combination that breaks a rule, with the reason in the Journal; before an optimization starts, OnTesterInit estimates which share of its passes the rules would reject and warns above a limit you set.

One include file that encrypts texts and bytes so only a program with the same key can read them. A wrong key or a changed message is refused instead of read as garbage, keys can come from a password, and the code is checked against the official NIST and RFC test vectors.

One include file that gives your EA or indicator keyboard shortcuts the user types into the inputs, such as Shift+B. Each press fires one action, Shift+B never fires on a plain B, and a shortcut that cannot work is refused at start with the reason.

Watches the equity like a prop firm does: daily loss limit and max loss limit, static or trailing, floating profit included. Stops new trades at a warning level, closes everything on a breach and remembers it after a restart.

Draws a live heatmap of two optimised inputs while the Strategy Tester optimises your EA, and scores every cell by its neighbourhood: the plateau score is the mean minus k times the standard deviation of the surrounding cells. It shows whether your best parameters sit on a stable plateau or on a single lucky cell, and writes an HTML report, a CSV and a picture of the map. Includes a Monte Carlo drawdown criterion and a small demo EA. Part of the free Robustness Lab set.

Builds H2 to D1 candles from H1 on the New York close clock, so your indicators see the same candles on every broker, no matter which server time it uses. Detects the server clock automatically.

One call before you send an order: is the session open, how long until it closes, are quotes still coming in, is trading allowed. Gives you the reason when the answer is no.

EA의 거래 방식을 처리하는 단일 파일 라이브러리입니다. 거래 전 점검, 브로커 한도 기준에 따른 정규화, 안전한 재시도, 신호당 주문 1건 처리, 매직 넘버를 통한 격리, 재시작 후 상태 복구 기능을 포함합니다. 리스크 기반 로트, 일일 손실 한도, 최소 순자산 한도도 포함되어 있습니다. 전략 테스터에서 검증되었습니다.

A library for MetaTrader 5 that checks every trade request of an existing Expert Advisor in the Strategy Tester, with one include line and no other change. Volume, stops level, freeze level, margin, trade mode and the order limit are checked; the request then goes out unchanged, and the Journal and a CSV list each violation with the file and line that sent it.

평균 또는 변동성의 변화를 온라인으로 감지하는 방법 (Adams-MacKay): 최근 k 바 동안의 변화 확률, 현재 구간 길이, 예측값 및 지표.

순위에 대한 5가지 이변량 코풀라를 적합시키며, 켄달의 타우, 꼬리 의존성, 공동 극값 발생일 확률, AIC 및 쌍별 거래의 조건부 확률을 포함합니다.

Include file with small functions to find the Gotobi days: the 5th, 10th, 15th, 20th, 25th and the last day of each month, moved back to the previous business day when they fall on a weekend or a holiday you list. Information only, no trading functions.

A library for MetaTrader 5 that puts trade management code behind an interface and tests it against a fake broker, without a trade server. The fake checks stops level, freeze level, tick grid and volume step, answers with retcodes chosen by the test and logs every request. An example break-even rule and 26 test cases come with it.

One include file that reads and writes JSON in MQL5. It refuses broken JSON and tells you the line and column of the mistake, keeps numbers exact, reads and writes UTF-8 files, and saves your EA's settings to a file and loads them back.

An include file that makes the way an EA sends its orders safe: the same signal is never traded twice. It has no trading strategy inside and comes with a small example EA.

수많은 전략 중 가장 우수한 전략이 정말 벤치마크보다 더 나은 성과를 내는 것일까? 핸슨의 SPA 테스트, 화이트의 리얼리티 체크, 로마노-울프의 StepM, 그리고 모델 신뢰 구간.

Decides if you can add to a running winner: only when all open trades in that direction are on break-even and the newest one is in profit. The open risk is never more than one add. Hedging accounts only.

Small MQL5 library that shares an EA's own runtime settings between charts of the same account, with edits from either chart, a file lock and per-field merge.

일일 결과의 블록 부트스트랩: 향후 몇 달 동안 계좌나 전략의 손실 폭이 어느 정도까지 커질 수 있는지, 백분위수와 재현 가능한 시뮬레이션을 위한 시드 생성기를 통해 확인합니다.

Break-even and trailing stop for open positions, measured in R (distance to the first stop loss). Respects stops level and freeze level, only moves the stop in profit direction.

조합 대칭 교차 검증을 통한 MT5 최적화의 백테스트 과적합 확률(PBO). 각 패스는 일별 결과를 프레임 형태로 전송하며, 최적화가 종료되면 PBO가 계산됩니다.

Small include file that gives you the lot size from risk in percent (or fixed money) and the stop loss distance. Rounds always down, checks min/max lot and free margin.

Converts session hours given in London, New York, Tokyo or Sydney time into broker server time, including US and EU daylight saving and the weeks when the two are out of step. Comes with a check script that verifies 15 hand-calculated cases.

A library for MetaTrader 5 that writes every pass of an optimization to a SQLite file: result, test statistics, your own metrics and the inputs of the pass. A demo Expert Advisor optimizes the Rosenbrock function in the mode "Math calculations".

Standalone MQL5 library for storing custom settings separately for each trade and following a verified pending-order-to-position lifecycle. It supports double, ulong and price-unit fields, terminal-local Global Variables, safe cleanup gates and an offline self-test. Includes a demo EA, source archive, and installation guide. A different-ticket transition, reconnection as a separate scenario, and netting behavior remain untested.

Converts broker server time to UTC and New York time with US and EU daylight saving rules. Works the same live and in the Strategy Tester, where TimeGMT() returns server time.

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.

Persistent MQL5 outbox with a Telegram demo and offline tests. An uncertain result is never retried automatically. Manual retry may duplicate a message; SENT means API acceptance, not a read receipt.

Expert Advisor에서 열린 포지션을 관리합니다: 손익분기점, 트레일링 스톱, 두 차례의 부분 청산, 그리고 해당 설정이 없는 포지션에 대한 스톱 및 목표가 설정 등이 포함됩니다. 이 Expert Advisor는 절대 매매를 개시하지 않습니다.

A stop distance in points is not money until the tick size and tick value make it one. This library turns four risk bases into a lot size, floors it to the volume step, caps it against free margin and tracks a daily loss limit. Two MQL5 headers, no DLL.

Exact maximum likelihood of an Ornstein-Uhlenbeck spread and Bertram's optimal entry and exit levels for a given cost, with the expected length of a trade cycle.

A lightweight tab bar for chart panels, drawn with the standard CCanvas class. One include file, several independent instances per chart, click selection, resizing and safe cleanup. Includes a demo Expert Advisor.

Parkinson, Garman-Klass, Rogers-Satchell and Yang-Zhang estimators, daily realized and bipower variance from intraday bars, and HAR volatility forecasts.

Five tests to tell a random walk from a mean-reverting series: KPSS, Phillips-Perron, DF-GLS, Zivot-Andrews with the break date, and the variance ratio.

Detects the broker's GMT offset and its daylight-time rule (fixed, US or European) from the weekly closes in the H1 history, the same way live and in the Strategy Tester, with functions that convert New York times to server time and back.

Unit root and cointegration tests (ADF, Engle-Granger, Johansen) with MacKinnon p-values, hedge ratio, half-life and z-score of the spread, and a pair scanner.

Kalman filter and smoother with an exact diffuse start, missing values and maximum likelihood: local level, local linear trend and a regression whose hedge ratio drifts.

Gaussian hidden Markov model fitted by Baum-Welch: regime probabilities without look-ahead, most likely path, expected durations and regime forecasts.

Holidays and early halts of the CME equity index futures (S&P 500, Nasdaq-100, Dow, Russell 2000, E-mini and Micro), computed from the US holiday rules for any year, with a script that checks the calendar against your broker's own M1 history.

Include for EAs running 24/7 on an MQL5 VPS or PC: run-where switch, order send with OK/FAIL/UNKNOWN result (no duplicate orders after a timeout), restart-safe counters, positions closed while the EA was off, append-only log and optional Telegram. No trading logic inside.

123456789101112