거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
귀하의 MetaTrader 5 터미널에서 CodeBase에 액세스 해보세요
올바른 코드를 찾을 수 없습니까? 프리랜싱 섹션에서 주문하세요
Expert Advisor 또는 지표 작성 방법

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

icon

이것은 MetaTrader 5 플랫폼 프로그램을 위한 최대 규모의 무료 소스 코드 라이브러리입니다. 여기서는 미리 만들어진 Expert Advisor, 기술 지표, 스크립트 및 라이브러리를 찾을 수 있습니다. MQL5 언어를 배울 때 코드 라이브러리를 사용하고 제공된 코드를 기반으로 자신만의 자동화된 거래 응용 프로그램을 개발하십시오.

게시된 코드를 자유롭게 다운로드 및 테스트할 수 있으며, MetaTrader 5에서 코드를 실행할 수 있습니다. 이 라이브러리는 또한 MetaTrader 5 플랫폼과 MetaEditor 개발 환경에서 직접 사용할 수 있습니다.

코드를 제출하세요

Ranks the current period's range-so-far against the full historical distribution of past ranges — a true percentile, not just a comparison to the average like ADR% — and flags statistical compression or expansion on a compact live panel with a percentile gauge.

A library of 24 MQL5 classes that watches a prop-firm rulebook -- drawdown, daily loss, payout consistency, minimum trading days, news blackout -- against any account, and flattens on breach without ever opening a position of its own.

여러 EA를 실행 중이거나(또는 이와 병행하여 수동 거래를 하는) 계정을 위한 읽기 전용 감사 스크립트입니다. 이 스크립트는 마감된 거래 내역을 매직 넘버별로 그룹화하고, 매직 넘버당 한 줄씩 출력합니다: 청산된 왕복 거래, 거래 양측의 스왑 및 수수료를 포함한 순 손익, 승률, 수익 계수, 평균 승패 금액, 현재 오픈 포지션 및 대기 중인 주문, 활동 날짜 및 종목 — 순 결과별로 정렬되며, 스프레드시트용 CSV 내보내기 기능이 제공됩니다.

Daily Zone Recovery는 MetaTrader 5용 다중 전략 트레이딩 Expert Advisor로, 전 거래일의 고점과 저점을 기반으로 작동합니다. 이 자동거래 시스템은 일일 고점 및 저점 부근의 가격 움직임을 추적하며, 세 가지 독립적인 진입 전략을 활용하고 고정 거래량 그리드를 통해 포지션을 관리할 수 있습니다.

MSNR KeyLevels MultiTF draws Malaysian SNR key levels from M5, M10, M15, H1, H4 and D1 at the same time, on any chart you have open. A built-in control panel lets you switch each timeframe on and off with a single click, so you go from a clean chart to full higher timeframe context in a second, and back again just as fast.

Daily Pivot Points indicator for MetaTrader 5 with Classic and Fibonacci methods. Displays PP, R1-R3 and S1-S3 using the previous completed daily candle.

Real-time risk calculator and lot size guard HUD for MT5. Computes exact lot sizing based on account balance, target risk %, and dynamic ATR Stop Loss with minimum lot overshoot warning.

위험 비율을 설정하고, 손절선을 드래그하면, 계좌 통화로 표시된 정확한 로트 규모를 확인할 수 있습니다. 여기에는 증거금과 목표 수익이 모두 포함됩니다. 이 도구는 계산만 할 뿐, 실제 매매는 수행하지 않습니다.

현재 추세 상황을 평가하고 브로커별 표준화된 매수 및 매도 리스크 계획을 수립해 주는 무료 오픈소스 MT5 읽기 전용 차트 유틸리티입니다. 이 유틸리티는 이동평균의 방향과 기울기, ADX, 효율성 지수, ATR, 스프레드, 계좌 통화 및 종목 정보를 활용합니다. 이 유틸리티는 절대로 포지션을 개설, 수정 또는 청산하지 않습니다.

A lightweight, OOP-compliant MQL5 header class (.mqh) for accurate pip value calculation and dynamic lot sizing across all instruments, featuring automated cross-currency rate conversion and broker volume normalization.

GDS Renko Replay Trainer is a free educational tool for practising manual decisions on historical Renko charts in MetaTrader 5. Load a historical interval, replay it forward and place virtual BUY or SELL trades. You can pause, advance one tick or move to the next completed Renko brick. Each virtual position has a stop loss and take profit, and the trainer records the results of your session. The tool builds fixed-size Renko bricks from historical Bid/Ask ticks, with a classic two-brick reversal. Future ticks are not used to draw the visible chart or execute virtual trades. Buy trades use Ask for entry and Bid for exit; sell trades use the opposite sides. Orders entered on the panel wait for the next replayed valid tick. Stops and targets are checked on every tick, including price gaps.

Built on Wyckoff Volume Spread Analysis (VSA) principles, it decodes smart money accumulation, distribution, absorption, and trend direction with zero repainting and a strict 2,000-bar performance limit.

Closed-bar ICT/SMC session-liquidity scanner for three symbols, with confirmed MSS, FVG retests, risk/reward projections and optional macro context.

A liquidity-sweep / order-block scalper with ATR-based sizing and a higher-timeframe trend filter. Every trade is tagged on the chart with the live historical win rate of that setup type — a running scorecard, not just boxes.

Drag your stop loss where you actually want it, hit Buy or Sell, and the lot size is already correct — no calculator, no spreadsheet. Handles break-even, trailing, and shuts trading down for the day if you hit your loss limit.

이 MT5용 EA는 거래를 실행하지 않고, 브로커 및 거래 환경의 기술적 사양을 수집하여 표시하는 진단 도구입니다. 코드는 4가지 주요 블록으로 구성되어 있습니다: 데이터 수집 (CollectAll): 계좌 정보(레버리지, 통화), 종목 정보(소수점 자리, 스프레드, 스왑, 거래량, 스탑 레벨), 지연 시간(핑), 시간대(서버-UTC 시차)를 추출합니다. 실제 통화로 스왑을 계산합니다. 샘플링(OnTick): 스프레드 통계(최소, 평균, 최대)를 실시간으로 업데이트합니다. 출력: 데이터를 “전문가” 로그에 기록하고, CSV 파일로 저장하며, 차트의 그래픽 패널(UpdatePanel)에 표시합니다. 헬퍼: CalcSwapInCurrency 및 다양한 *ToStr 함수는 브로커의 원시 수치 데이터를 가독성 있는 문자열로 변환합니다.

극단 구간의 교차에 기반해 매수 및 매도 신호를 생성하는, 리페인팅이 발생하지 않는 확률론 기반 지표로, 교대 신호 필터와 봉 종가 알림 기능을 갖추고 있습니다.

Three position-sizing protections that do different things; confusing them is why so many accounts get wiped out: - ladder: one contract per X of balance, always applied as a CAP, even with manual lot sizing; - floor: below the minimum capital it does not trade; a new deposit is needed; - breaker: stops at X% below the peak, at any account size, and does not rearm by itself. What this library solves and almost none does: a deposit is not profit, and a withdrawal is not a loss. The breaker measures the drop against the balance peak. Untreated, a deposit made DURING a drawdown lifts balance and peak together, and the protection stops seeing the drop exactly when it would help. Here deposits and withdrawals shift the peak by the same amount. The peak is persisted to a file: a breaker that forgets the peak on a terminal restart is not a breaker. The demo simulates a deposit at the bottom of a drawdown. Run it with the deposit on and off and compare the "drop" column.

Four EAs writing to the same file, all with FILE_SHARE_READ|FILE_SHARE_WRITE, FileSeek(SEEK_END), FileWrite, FileClose. Looks correct. Every FileOpen returns success. No error in the log. And the lines vanish. Reason: FILE_SHARE_WRITE lets all four open at the same time. All four call FileSeek(SEEK_END) and get THE SAME offset, because none has written yet. All four write at the same position. Whoever closes last wins. Three lines vanish silently. In my case: 12 events expected, 8 in the file. The fix is to open EXCLUSIVELY (no FILE_SHARE_WRITE) and retry while another EA holds the file. And to shout in the log when the retries run out: a log that fails silently is worse than no log at all, because you trust it. The demo script reproduces both modes. To see the loss, drag it onto four charts at the same time with safe mode off and count the lines in the CSV. On a single chart the defect does not show up - which is why it passes in testing and breaks in production.

TimeCurrent() is not a clock. It is the stamp of the LAST TICK. Two consequences break robots in production: 1. It freezes. With no tick it does not move: illiquid instrument, end of session, unstable connection - and any rule based on it stops with it. 2. It steps backwards: on a symbol switch, a reconnection or a tick from another instrument, the value can go back. The case that cost me a whole protection: I compared the date of a daily decision with TimeCurrent() to reject an expired one. The server clock stepped back to the previous day, the comparison matched, and four EAs accepted YESTERDAY's decision as valid. The gate that should have failed closed failed open - without a single error in the log. Rule: TimeLocal() for timestamps, dates, day changes, expiry - all that must always move forward; TimeCurrent() for session hours and market data. The script measures the divergence in your environment and reports both symptoms live. Run it with the market closed.

Measures, hour by hour, how far a symbol travels and how much of that the spread takes away. Built for gold, works on any symbol, compares several side by side.

Detects the gold symbol whatever the broker calls it, reads the contract specification from the terminal instead of assuming it, and turns a risk in account currency into a lot size that is correct for that broker.

Opens a virtual bracketed trade on every M1 bar, walks it forward on the real tick history, and reports for a sweep of stop distances how often 1-minute OHLC modelling would score the trade the wrong way round.

Gold has a daily maintenance break on the CME. The first hour after it rises more than chance explains, in every calendar year of an 11-year sample - while every other hour of the day measures flat. One trade per session, a volatility-scaled server-side stop, no averaging or grid. Then my cost model turned out to be wrong. A real-tick backtest showed the true round-trip cost at the reopen is about 60 points, not the 19 my research had charged - the M1 bar spread field is a per-bar summary and understates it roughly threefold. Re-running 11 years at the corrected cost: +3.34 bps, t 7.40, 59.3% wins -> +1.60 bps, t 3.42, 50.8% wins The edge survives, at less than half its original strength. That second number is the real one. What it is not: about +3.3% a year with 4.6% drawdown, roughly one year in nine negative. At 0.01 lots that is ~130 a year - a figure that measures the position size, not the strategy.

Exports one CSV line per closed trade with the numbers a statement does not carry: the best unrealised profit the trade showed (MFE), the worst unrealised loss it survived (MAE), how much of the MFE was actually kept, how many bars it spanned, and how long it was held. Same measurement as the Trade Excursion indicator, written to a file instead of drawn, because the questions worth asking of this data are ones a chart cannot answer: does the capture ratio depend on the hour of entry? Are the trades I close early the ones I hold longest? Do losers on Mondays reach a different MAE than on Fridays? Those are one pivot table away once the CSV exists. Output is semicolon separated with a header row, in MQL5\Files; opens in any spreadsheet. Measurement limit: excursions come from bar highs and lows on the chosen timeframe; the path inside a bar is unknown. The bars column reports the resolution each trade got, and the summary counts single-bar trades separately instead of averaging them in.

Your statement tells you what you KEPT. It does not tell you what you HAD. This indicator reads your own closed trades from the account history and draws, for each one, the full range it travelled: the best unrealised profit it ever showed (MFE) and the worst unrealised loss it survived (MAE). The gap between what a trade showed and what it paid is where two common problems hide, and neither is visible in a balance curve: winners closing far below their best point (the exit leaves money behind), and losers whose worst excursion barely passed the stop (the stop sits inside the noise). The number to look at is the CAPTURE RATIO: of the profit a winner showed at its best, how much did you take home? 90% says the exits are well placed; 30% says the market kept offering and the exit kept refusing. Limit, stated up front: excursions come from the bars each trade spanned, on the chart timeframe; the path inside a bar is unknown. Predicts nothing; measures trades that already happened.

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.

Four EAs on the same symbol, each one honest on its own: each checks "do I have a position?" with its own magic number, sees none, and enters. On a demo account this reached 22 contracts on a symbol meant to carry 1, and a watchdog had to close 16 positions in one morning. The cap belongs at the door, not after the fact. ExposureCap::Allowed(symbol, lots, cap) sums the volume of every open position on the symbol - all magic numbers, manual trades included - and refuses the order BEFORE it is sent when it would breach the cap. One log line with the three numbers (held, requested, cap) says why. Deliberately simple: gross exposure, no netting of longs against shorts, no per-EA quota. It is a check, not a lock: two EAs deciding on the same tick can both pass; in practice EAs on different charts decide on different ticks. The demo script prints held / cap / room for the current symbol and shows the refusal line. Nothing is traded.

A datetime in MQL5 is seconds since 1970 - but server time (TimeCurrent, bar times, deal times) is the broker's wall clock stored AS IF it were UTC. Export it to CSV, read it in Python or a spreadsheet with a "seconds since 1970 UTC" parser, and every timestamp shifts by the server's UTC offset. On a UTC-3 broker that is three hours: the daily bar dated 00:00 reads as 21:00 of the previous day, and "yesterday's session" silently becomes "today's, half formed". That happened to a morning report of mine before this script existed. The script prints TimeTradeServer, TimeCurrent, TimeGMT and TimeLocal, the three offsets between them, the tick lag, and this chart's last bar time in server time and in real UTC - then states the rule: export server timestamps as wall-clock text, or export the epoch together with the offset, and never let the consumer apply its own timezone.

A simple MQL5 script that calculates the correct lot size for a trade based on your account risk percentage and stop loss distance in pips, so every trade risks a consistent, controlled amount of your balance.

Sizes your next trade based on the correlated risk you already have open across other positions — not just the trade in isolation.

Checks your trade history against common prop-firm challenge rules — profit target, max daily loss, max drawdown, consistency rule, and minimum trading days — with a clear PASS/FAIL report.

MetaTrader 5용 전문 오픈소스 캔들 강도 분석기입니다. 캔들 몸통, 상단 및 하단 촛대, 매수/매도 압력, 반등, 등락폭 확대 및 캔들 강도를 실시간으로 분석합니다.

기존의 수동 또는 EA 포지션을 조정하기 위해 특별히 설계된 MetaTrader 5용 차트 내 거래 관리 유틸리티입니다. 원클릭으로 손익분기점 설정, 포인트 오프셋, 이익 실현, 트레일링 스톱, 위험 대비 수익률(1R–3R)에 따른 테이크 프로핏 목표, 거래량 기반 부분 청산(25%–100%) 기능을 제공합니다. 드래그 가능한 차트 GUI와 종목 및 방향별 필터링 기능이 포함되어 있습니다. 새로운 포지션을 개설하지는 않습니다.

A small educational Expert Advisor showing how a classic Donchian breakout can be applied directly to completed Renko bricks.

Cost is the one input to a trading system that is knowable exactly, and it is almost always estimated wrongly - always in the direction that flatters the strategy. This EA measures what one round trip really costs on YOUR broker: the live spread sampled from ticks, the swap for both sides including the triple-charge day, and the commission read from your own deals. Most spread figures come from the bar's "spread" field, because that is the easy one to reach. It is a per-bar summary, not the quote at any instant. Measured on XAUUSD: 20 points live across 60 readings against a bar-field median of 6. A factor of 3.3. So a filter set to "skip if spread > 15" never fires - it lets through exactly the moments it exists to block. Swap is the half most custom simulators do not charge at all. It is asymmetric, one side pays while the other collects, and one weekday counts three times. Read-only: it never opens, closes or modifies a position.

An Expert Advisor that trades the SuperTrend TV indicator through iCustom on closed bars only, shipped with the audit that proves every trade matches a signal and no signal was missed

Attach it to a chart, type the name of any custom indicator, and it alerts you on that indicator's own buffers - popup, sound, push notification to your phone, or email. It reads the indicator through iCustom, so no source is needed: a compiled .ex5 you downloaded is enough. It can also read that indicator from a higher timeframe, and it re-checks closed bars to tell you whether the indicator repaints or merely lags. It opens in EXPLORE mode, which lists every buffer the indicator has and what is in each one, because "which buffer holds the signal" is the question that stops most people using iCustom at all.

A SuperTrend that returns the same values as TradingView's ta.supertrend, shipped with the tool that proves it bar for bar against the Pine reference

Read-only panel that checks a BUY STOP or SELL STOP against the symbol contract before you send it: price tick grid, volume minimum/step/maximum, stop distances and order permissions. It never sends, changes or suggests anything.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206