MQL4 및 MQL5 소스 코드 라이브러리
MQL5 또는 MQL4 프로그래밍 언어를 어디서부터 배워야 하는지 모르시겠나요? MetaTrader 터미널을 위한 다양한 프로그램을 이용할 수 있습니다. 게시된 코드 예제를 다운로드하고 연구하며, 자신만의 지표와 Expert Advisor를 개발하십시오. 최대 MQL5 및 MQL4 코드 라이브러리에 응용 프로그램을 게시하면 모든 MetaTrader 터미널 및 MetaEditor에서 사용할 수 있습니다.
MQL4 및 MQL5의 코드 예제는 전 세계에 배포될 것이며 수천 명의 거래자가 귀하에 대해 알게 될 것입니다!
Trending up, trending down or ranging: a verdict for every bar, and how long it has held. Each stretch of one regime is boxed on the price chart, ADX columns below show how strong it is, and a one-line panel gives the regime, its age and the ADX. Values for Expert Advisors and an alert on closed bars.
Reads your closed positions and the M1 bars after each exit. Shows how many stopped-out trades later reached their take profit, how far take-profit trades kept running and how much move was left after manual or EA exits. Summary panel, per-position log table and CSV.
Free educational EA — a single-position trend-following EMA crossover system for XAUUSD M30, released as open source for beginners to study trade ownership guards, preflight order validation, risk-based lot sizing, and server-time session filtering. This code demonstrates how a strategy - identifies and manages only its own positions and orders through MagicNumber and comment tags, - wraps CTrade with an OrderCheck preflight that blocks invalid or margin-breaking requests, - sizes each trade from a fixed stop-loss and risk percentage, - and restricts entries to a configurable broker session window with a daily close-all — all evaluated on completed bars only, so signals never repaint.
아시아, 런던, 뉴욕 세션의 범위 박스를 표시하고 유동성 스윕을 표시합니다: 유동성 스윕이란, 완료된 세션의 고점 또는 저점을 넘어 촛대 심지가 뻗어 나갔다가 다시 그 범위 안으로 돌아와 마감된 캔들을 말합니다. 재그리기되지 않는 화살표, 확장된 세션 수준, 알림 및 iCustom 지원 버퍼 기능을 제공합니다.
계정 보호 기능이 내장된 ‘개장 범위 돌파(Opening Range Breakout)’ EA 템플릿입니다. 세션 개장 후 첫 N분 동안의 고점과 저점을 표시하고, 해당 범위 상단과 하단에 OCO 스톱 주문을 설정합니다. 위험 기반 포지션 크기 조정, 일일 손실 한도, 최대 드로다운 한도, ATR 범위 필터, 거래 방향 필터, 그리고 익일 이월 포지션에 대한 보호 기능이 포함되어 있습니다. 모든 세션 시간은 사용자 정의가 가능한 입력값입니다. 본 템플릿은 교육용이며, 수익을 보장하는 시스템이 아닙니다. 실거래에 사용하기 전에 반드시 데모 계좌에서 테스트하십시오.
Non-repainting fair value gaps on closed bars, with zone states (active, touched, mitigated) and iCustom buffers for EAs.
Real-time daily drawdown buffer monitor and exact breach price line indicator for prop firm accounts. Features 00:00 server-time deal history reconstruction (including entry commissions), 00:00 HWM snapshot locking, two-stage OrderCalcProfit cross-rate calibration, and iCustom() data buffers for Expert Advisors.
현재 ATR의 백분위 순위에 따라 차트 배경을 변동성 구간(압축, 정상, 확장)별로 색상을 구분하여 표시합니다. 차트에 현재 구간을 표시하고, 구간 변경 시 알림을 제공하며, Expert Advisors용 버퍼를 노출합니다.
현재 ATR의 백분위 순위에 따라 차트 배경을 변동성 구간(압축, 정상, 확장)별로 색상을 구분하여 표시합니다. 차트에 현재 구간을 표시하고, 구간 변경 시 알림을 제공하며, Expert Advisors용 버퍼를 노출합니다.
한 번의 클릭으로 모든 마켓워치 종목 또는 사용자 지정 종목 목록의 차트를 모든 시간대에서 열 수 있으며, 각 차트에 원하는 템플릿을 적용할 수도 있습니다. 이미 열려 있는 차트는 건너뛰며, 한 번에 열리는 차트의 수를 제한합니다.
이 기능은 M1 거래 내역에서 계산된 포인트 및 금액 단위의 최대 부정적 편차(MAE)와 최대 긍정적 편차(MFE), 그리고 각 거래가 포착한 가용 변동폭의 비율을 포함하여 체결된 거래를 CSV 파일로 내보냅니다.
See the real leverage of every Market Watch symbol, including floating margin tiers, with swap, commission and live spread in one panel.
Watches the whole account and closes everything before the daily loss or max drawdown limit is breached, then keeps the account flat until the block ends. Does not trade.
Expert Advisor template that shows safe execution practices: closed-bar signals once per bar, no duplicate entries after an MT5 or VPS restart, spread and stop-level checks, normalised volume and a log line for every decision.
Shows the current spread next to its recent average and maximum and compares it with ATR, so you can see at a glance when trading costs are too high relative to the symbol's normal movement.
On-chart panel that calculates the lot size for a given risk (% of balance, % of equity or fixed money) and stop-loss distance, using the broker's tick size and tick value. Works on forex, metals, indices and crypto.
Trailing stop and breakeven manager for Gold (XAUUSD), forex and any symbol: moves the stop to breakeven with an offset, then trails it in points or ATR multiples on manual trades and on any EA, filtered by magic and symbol. Open source code.
Script that reads the deal history of your account and writes a plain note on how an Expert Advisor really trades: entries, stops and trailing, lot changes, martingale, averaging, trades at once, hours and holding time, plus what to watch out for. It never trades and says nothing about profit
WaveMaster 오실로스코프용 신호 기반 자동화. WaveMaster 오실로스코프용 자동 실행 엔진입니다. 신호 버퍼를 실시간으로 읽어들입니다. 포괄적인 리스크 관리, 트레일링, 손익분기점 기능이 내장되어 있습니다.
터미널에 실제로 저장된 바(bar) 내역을 감사합니다. 이 내역은 모든 백테스트와 지표가 참조하는 데이터입니다. 심볼당 6가지 항목을 점검합니다: 비정상적인 OHLC 값, 바 시간 오류, 브로커의 세션 테이블에 호가 제공 중으로 표시된 시간대에 바가 누락된 경우, 빈 바 및 평평한 바, 브로커의 M1 시리즈와 일치하지 않는 바, 스프레드 타당성 등입니다. 가장 중요한 지표는 세션 커버리지이며, 주로 감사 대상에 주말이 얼마나 포함되었는지를 측정하는 그리드 비율이 아닙니다. 모든 검사 결과는 바 시간과 함께 CSV 파일로 저장되며, 감사된 바 데이터와 세션 테이블을 추출할 수 있으므로 이 도구 이외의 다른 방법으로 전체 보고서를 재검토할 수 있습니다.
Draws the previous day, previous week and previous month high and low, plus automatic round-number levels around the current price. Every level carries a label with how many times price touched it and how many times a bar swept it (pierced the level and closed back on the original side). Counts use closed bars only, so they do not repaint. Optional alerts (popup, push, email, sound) for sweeps and new touches. Touch tolerance is a fraction of ATR or a fixed number of points. The 6 previous-period levels and their touch counts are exposed in 12 indicator buffers for use from an Expert Advisor with iCustom(). Works on any timeframe up to H4. Read-only: it never opens, modifies or closes a trade. No DLLs, no web requests.
Draws the opening range of a configurable session (start time and length in minutes, with a server time zone adjustment), the 1R and 2R levels above and below the box, and the session VWAP (tick volume, or real volume when the broker provides it). A small panel counts, over the last N finished sessions, how many broke the range up only, down only, on both sides, or not at all, and how often price reached 1R and 2R after the first break. The statistics are historical counts: they describe the past and do not predict anything. Only closed bars are used, so nothing repaints; optional popup, push and sound alerts fire once per direction per session when a closed bar closes outside the box. Eight buffers (range, targets, VWAP, break state) can be read from an Expert Advisor with iCustom(). Works on M1 to M30, recalculates only new bars and deletes its chart objects when removed. Read-only: it never trades. No DLLs, no web requests.
Draws the high and low of the Asia, London and New York sessions as boxes or lines extended to the end of the day, with configurable session hours and a server time zone adjustment. Optional previous day and previous week high/low. When a CLOSED bar breaks the high or low of a session that has already finished, it can raise a popup alert, a push notification and/or a sound, once per level per day. Alerts are evaluated on closed bars only, so they do not repaint. The 10 levels are exposed in indicator buffers, so an Expert Advisor can read them with iCustom(). It recalculates only new bars, works on any timeframe up to H1, and deletes all its chart objects when removed. Read-only: it never opens, modifies or closes a trade. No DLLs, no web requests.
Marks bullish and bearish engulfing, bullish and bearish pin bar and inside bar patterns with arrows, using closed bars only, so nothing repaints. The definitions (wick and body proportions, minimum bar size in ATR) are inputs, with an optional EMA trend filter. For each pattern a small panel shows a rolling historical statistic: the share of the last N resolved cases where price moved X ATR in the pattern direction before moving Y ATR against it, together with the number of cases. X, Y, N and the waiting time are inputs. The numbers describe what happened on your chart history; they do not predict the next trade. Optional alerts on closed bars (popup, push, sound). 20 buffers (signal, hit rate and sample size per pattern) can be read with iCustom(). Uses prev_calculated, deletes its chart objects when removed. Read-only: it never trades. No DLLs, no web requests.
Utility Expert Advisor that watches the account equity against two limits: a maximum daily loss and a maximum total drawdown. Each limit can be set as a percentage or as a money amount, and the daily loss can be measured from the balance or from the equity at the start of the day, as many prop firms do. When a limit is touched the EA closes all positions, deletes all pending orders and keeps the account locked until the next trading day: anything opened in the meantime, by another EA or by hand, is closed again. Optional early warning at a percentage of the limit (Alert and push), a small on-chart panel, a magic number / symbol filter, a configurable day-reset time and retries when a close fails. The state is stored in terminal global variables, so a restart does not unlock the account. Works on hedging and netting accounts. No DLLs, no web requests. It never opens trades (only the optional Strategy Tester demo mode does).
Exports your closed trade history to a CSV file with one row per position (not per deal), ready for Excel, Python or any journal. Each row has ticket, symbol, magic number, comment, side, volume, entry and exit time and price, duration, initial SL and TP when known, gross profit, commission, swap, net result and R multiple. It also calculates MFE and MAE (best and worst price reached while the trade was open, in points and in money) from the M1 bars between entry and exit, plus the entry session (Asia, London, New York) and weekday. Filter by magic number (lists and ranges) and symbol (wildcards), pick the period, the column separator (; or ,) and the decimal mark, and save to MQL5\Files or the common folder. Tested on hedging accounts and in the Strategy Tester (netting logic included; feedback welcome), where the file is written when the test ends. Read-only: it never opens, modifies or closes a trade. No DLLs, no web requests.
XAUUSD grid EA that opens a basket when RSI leaves oversold or overbought on a closed candle, adds levels with a lot multiplier and closes the basket at a money or points target. Open source code.
매직 넘버를 기준으로 동일한 헤징 계좌에서 다른 EA가 개설, 수정 및 청산한 거래를 미러링합니다. 기본적으로 거래 방향(매수↔매도, SL↔TP)이 반전되므로, 실제 스프레드, 슬리피지 및 체결 조건을 반영하여 전략의 반대 방향에 대한 포워드 테스트를 수행할 수 있습니다.
올슨 그룹의 알파 엔진(Alpha Engine)을 포팅한 버전으로, 8명의 리미트 오더 에이전트가 헤징 계좌에서 내재 시간에 따른 방향 전환을 거래합니다. 이들은 가격이 과도하게 움직일 때 포지션을 추가하고, 반전 시 이익이 발생하면 포지션을 축소합니다.
Manages positions that are already open: it adds a missing SL/TP, moves the stop to break even, trails it, caps the position count and applies daily equity limits. It never opens trades.
Draws the high and low of a chosen time window and alerts on the first break on each side. The levels are also available through iCustom.
Close all positions panel for MT5: seven buttons to close all, buys, sells, winners, losers, the chart symbol or delete pending orders, on Gold (XAUUSD), forex or any symbol, for manual trades and any EA. Open source code.
Auto Fibo Extended is a MetaTrader 5 indicator designed to automatically identify significant swing highs and swing lows and draw Fibonacci Retracement and Extension levels directly on the chart.
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.
A one-file library that handles how an EA trades: pre-trade checks, normalisation to broker limits, safe retries, one order per signal, isolation by magic number and state recovery after a restart. Lot by risk, daily loss limit and equity floor included. Verified in the Strategy Tester.
A regime-classification oscillator that measures how far, and how persistently, price deviates from a rolling volume-weighted VWAP in standard-deviation units, separating trending conditions from ranging ones.
A small include class that stops indicator alerts from firing on every tick. One alert per event and bar, silent about history on start, popup, push, email or sound, and an optional log of every decision. Comes with a working range break indicator as an example
주장 자체를 그대로 믿기보다는 지표가 재그리기(repaint)되는지 여부를 측정합니다. 이미 마감된 봉에 대해 사용자 정의 지표의 버퍼를 다시 읽어들이고, 변경되거나 나타나거나 사라지는 모든 값을 집계하며, 이러한 현상이 여전히 발생하는 가장 먼 과거 시점을 파악합니다. 차트 패널의 각 버퍼에 대한 판정 결과가 표시되며, 모든 이벤트는 CSV 파일에 기록됩니다.
스탑이 어디에 위치해 있을 가능성이 높은지, 그리고 어떤 스탑이 방금 발동되었는지를 보여줍니다. 유동성 풀 = 가격이 아직 돌파하지 않은 확인된 스윙 고점과 저점, 동일한 고점/저점(더 큰 풀), 그리고 전날의 고점과 저점입니다. 봉이 풀을 넘어 거래되면 ‘스윕(swept)’으로 표시되며, 같은 봉이 다시 풀 내부로 마감되면 ‘잡혔다가 거부됨(grabbed & rejected)’으로 표시됩니다. 리페인팅 없음: 스윙은 양쪽에서 N개의 마감된 봉이 지난 후에만 사용됩니다. 이 패널은 CCanvas에 그려진 네온 도시입니다: 가격은 하늘을 나는 자동차, 매도 스탑은 그 아래의 타워, 매수 스탑은 그 위의 떠 있는 플랫폼, 어제의 수준은 황금색 광고판, 탐조등이 하늘을 비추고, 티커에는 오늘의 성과가 표시됩니다. 두 개의 버퍼는 전문가 자문가(Expert Advisor)에서 사용할 수 있도록 상하방에서 가장 가까운 활성 풀을 제공합니다. 지표 전용: 절대 매매를 수행하지 않습니다.
Tests "buy at hour X, exit Y hours later" on your broker's own history after spread, commission and swap, with an out-of-sample split, weekday/year breakdown and an all-hours baseline.