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

Volatility Squeeze Scanner — Bollinger inside Keltner, with momentum histogram - MetaTrader 5용 지표

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


The idea

Volatility clusters. Quiet periods are followed by expansions, and the switch is often sudden. The scanner measures compression by comparing two volatility envelopes around the same 20-bar average:

Envelope Measures
Bollinger Bands (2 σ) Standard deviation of closes
Keltner Channel (1.5 × ATR) Average true range

When the Bollinger Bands fit inside the Keltner Channel, price is unusually calm for its normal range: a squeeze.

Reading the scanner


Element Meaning
Red dot Squeeze on: volatility compressed
Green dot Squeeze released
Bright green bar Upward momentum, increasing
Pale green bar Upward momentum, fading
Bright red bar Downward momentum, increasing
Pale red bar Downward momentum, fading

The momentum value is the close minus the average of the Donchian midline and the SMA. It tells you which way the release is going.

On gold


Gold's large moves of the last decade — the 2019 breakout and the 2024 rally — both started from long compression phases. In the author's research, long-only H4 squeeze breakouts on XAUUSD with a D1 uptrend filter and stops of 3 ATR or wider had the best profit factor of all engines tested. Tighter stops (2.5 ATR) broke the edge, because squeeze breakouts often retest the breakout level first.

Inputs

Input Default Description
Length 20 BB, KC and momentum length
Bollinger multiplier 2.0 Standard deviations
Keltner ATR multiplier 1.5 ATR multiple
Alert when squeeze fires false Alert on the first closed bar after a squeeze

Using it from an EA

int h=iCustom(_Symbol,PERIOD_H4,"SqueezeScanner",20,2.0,1.5,false);
double dot[];
if(CopyBuffer(h,3,1,6,dot)==6)          // colour index of the last 6 closed bars
  {
   bool recent_squeeze=false;
   for(int i=0;i<6;i++) if(dot[i]==0) recent_squeeze=true;   // 0 = squeeze on
  }

Buffer Content
0 / 1 Momentum / colour index (0,1 up · 2,3 down)
2 / 3 Dot / colour index (0 squeeze · 1 released)
5 Squeeze flag (calculation buffer)

Implementation notes

  • ATR uses Wilder smoothing (RMA), as most charting platforms do.
  • Incremental calculation with prev_calculated ; light enough for many charts at once.

Author: Shipra Gupta (SGupta30) · squeeze-based Expert Advisors for gold and Bitcoin are in the author's Market profile.

Gold Donchian Breakout Channel (non-repainting, with HTF trend filter) Gold Donchian Breakout Channel (non-repainting, with HTF trend filter)

Donchian channel of the N bars before each bar, midline and confirmed breakout arrows that never repaint. Optional D1 EMA-slope filter shows only breakouts in the higher-timeframe trend. Alerts and push. Any symbol.

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.

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.

Gold Trend Breakout Lite — educational XAUUSD trend-following EA Gold Trend Breakout Lite — educational XAUUSD trend-following EA

Open-source gold EA built on XAUUSD's multi-day trend persistence: H1 Donchian breakout in the direction of the D1 EMA slope, 3×ATR hard stop, break-even at +1R. Fixed lot, one position, no grid, no martingale.