거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Telegram에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
지표

Gold Donchian Breakout Channel (non-repainting, with HTF trend filter) - MetaTrader 5용 지표

Shipra Gupta
Shipra Gupta
저는 Shipra Gupta이며, 수학, 경제학 및 알고리즘 트레이딩 시스템 분야에 강력한 배경을 가진 트레이더이자 퀀트 전략 개발자입니다. 수년간 외환(Forex), 금, 지수, 원자재 및 암호화폐 시장 전반에서 활동하며 일관성, 정밀성 및 체계적인 실행을 목표로 한 데이터 기반 거래 전략 개발에 집중해 왔습니다.
조회수:
80
평가:
(1)
게시됨:
업데이트됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동


What it does

The indicator draws the highest high and lowest low of the N bars before each bar, plus the midline. When a bar closes beyond the channel for the first time, an arrow is placed on that bar.

  • Blue line: upper channel. Orange line: lower channel. Dotted: midline.
  • Green ▲: first close above the upper channel. Red ▼: first close below the lower channel.

With the trend filter on, an up-arrow is shown only while the D1 EMA is rising over the last k completed daily bars, and a down-arrow only while it is falling.

Why it never repaints


  1. The channel of bar i uses bars i−N … i−1 only, so the current bar can break it.
  2. Arrows are written only for closed bars — the forming bar never shows one.
  3. The higher-timeframe filter reads the last completed daily bar, so there is no look-ahead in the Strategy Tester either.

What you see in history is exactly what you would have seen live.

Works on any market


Market Timeframe Period Trend filter
XAUUSD swing H1 120 (≈ one week) D1 EMA 100
XAUUSD position H4 40–80 D1 EMA 50
BTCUSD H1 / H4 60–160 D1 EMA 50–100
Indices H1 80–120 D1 EMA 100

Inputs


Input Default Description
Channel length 120 Bars in the channel
Filter by HTF EMA slope true Show only trend-direction breakouts
Trend timeframe D1 Timeframe of the filter
Trend EMA period 100 EMA length
EMA slope look-back 3 Completed HTF bars for the slope
Alert / Push false Notify on a new confirmed arrow

Using it from an EA

Buffer Content
0 / 1 / 2 Upper / lower / mid channel
3 Breakout up (price or EMPTY_VALUE)
4 Breakout down (price or EMPTY_VALUE)

int h=iCustom(_Symbol,PERIOD_H1,"GoldDonchianChannel",120,true,PERIOD_D1,100,3,false,false);
double up[];
if(CopyBuffer(h,3,1,1,up)==1 && up[0]!=EMPTY_VALUE)
   Print("confirmed breakout on the last closed bar");

Background

The author's research on XAUUSD M1 data from 2010 to 2026 found that H1/H4 Donchian breakouts in the direction of the D1 EMA trend, with wide ATR stops, were profitable across a broad parameter grid in- and out-of-sample. This indicator shows that signal on your chart; the full trading logic is explained in the author's MQL5 article on building a gold trend-breakout EA.

Author: Shipra Gupta (SGupta30) · complete gold and Bitcoin breakout EAs are in the author's Market profile.


Broker Tick and Rollover Spread Forensic Auditor Broker Tick and Rollover Spread Forensic Auditor

Read-only forensic script that audits historical broker Bid/Ask ticks in 15-day RAM-safe chunks: computes session spread percentiles (P50/P95), 23:00-00:15 rollover widening ratios, weekday feed blackout gaps, and exports clean millisecond CSV files.

Relative Volume (RVOL) Indicator in a Subwindow Relative Volume (RVOL) Indicator in a Subwindow

Relative Volume (RVOL) in a subwindow: the volume of every bar divided by its normal volume, drawn as a color-coded histogram with reference levels and a live text label.

Volatility Squeeze Scanner — Bollinger inside Keltner, with momentum histogram Volatility Squeeze Scanner — Bollinger inside Keltner, with momentum histogram

Shows when volatility is compressed (Bollinger Bands inside the Keltner Channel) and which way it releases. Red dots = squeeze on, green = released, four-colour momentum histogram. Wilder ATR, closed bars, no repaint.

Risk Lot Panel — drag the stop line, read the lot size for your risk percentage Risk Lot Panel — drag the stop line, read the lot size for your risk percentage

On-chart position-size calculator. Drag the stop line (and optional target line) and the panel shows lots for your risk %, money at risk and reward:risk. Uses OrderCalcProfit, so it is correct for gold, indices, crypto, FX and any account currency.