Dao động MomentumMean ReversionCrossover Có trong Builder

Stochastic Oscillator

Stochastic

The Stochastic Oscillator shows where the close sits inside the recent high–low range, on a bounded 0–100 scale. It reacts faster than RSI and carries its own signal line, which makes both level rules and crossover rules straightforward to wire into a no-code EA.

Default settings
5 / 3 / 3
Common levels
80 / 20
Indicator range
0–100
OverboughtOversoldCentreline 50Divergence

Minh họa — dữ liệu tổng hợp, không phải giá thực.

What Stochastic tells you

Stochastic asks a narrow question: within the last K bars, did this bar close near the top of the range or near the bottom? A reading near 100 means closes are clustering at the highs, which is a statement about persistence, not about a reversal being due.

  • Above 80: closes are pinned near the top of the range
  • Below 20: closes are pinned near the bottom
  • %K crossing %D marks the moment that pressure changes hands
  1. 1 Find the high–low range of the last K bars
  2. 2 Locate the close inside that range
  3. 3 Smooth to get %K, then average it to get %D
Hiển thị công thức & chi tiết tính toán

Stochastic locates the close inside a recent range and then smooths the result twice:

  1. Over the last K bars, find the highest high and the lowest low.
  2. Express the current close as a percentage of that range: raw %K = 100 × (Close − Lowest Low) / (Highest High − Lowest Low). A close at the top of the range gives 100, at the bottom gives 0.
  3. Apply the slowing average to raw %K. The result is MAIN_LINE, buffer 0 — what MT5 draws as %K.
  4. Average %K over the D period to get SIGNAL_LINE, buffer 1 — the dotted %D line.

Because the denominator is the range itself, the reading is bounded to 0–100 and adapts automatically to volatility: the same 40-pip move gives a different number in a wide range than in a narrow one. That is also the indicator’s weakness — in a strong trend the range keeps shifting with price, so the close stays near the top and the reading stays pinned.

In MQL5 the call is iStochastic(symbol, period, Kperiod, Dperiod, slowing, ma_method, price_field). Note the last argument: it is a ENUM_STO_PRICE field selector (STO_LOWHIGH or STO_CLOSECLOSE), not an ENUM_APPLIED_PRICE. George Lane popularised the oscillator in the 1950s.

Tín hiệu

Các tín hiệu có thể backtest của Stochastic — và điều kiện thị trường phù hợp với từng tín hiệu.

Overbought / Oversold

Sẵn sàng trong Builder
Điều kiện
%K moves above 80 or below 20
Điều kiện tốt nhất
Ranging markets
Sử dụng thông thường
Fade the extreme — with a range or band filter

%K / %D Crossover

Sẵn sàng trong Builder
Điều kiện
%K crosses its signal line
Điều kiện tốt nhất
Turning markets
Sử dụng thông thường
Time the entry more precisely than the level alone

Centreline Cross

Sẵn sàng trong Builder
Điều kiện
%K crosses the 50 line
Điều kiện tốt nhất
Trending markets
Sử dụng thông thường
Flip momentum bias without waiting for an extreme

Divergence

Logic nâng cao
Điều kiện
Price makes a new extreme, %K does not
Điều kiện tốt nhất
Trend exhaustion
Sử dụng thông thường
Anticipate a stall before price confirms

Triển khai trong MT5

Những gì MetaTrader 5 thực sự tính và vẽ — cơ sở tham chiếu cho mọi quy tắc trên trang này.

Bộ đệm

Chỉ số Bộ đệm MT5 vẽ dưới dạng Chứa gì
0 MAIN_LINE Line %K — where the close sits in the high–low range of the last K bars, after the slowing average is applied.
1 SIGNAL_LINE Dotted line %D — a moving average of %K over the D period. This is the line %K crosses.

Ghi chú nền tảng

Hoạt động tốt nhất / sử dụng cẩn thận

Không có chỉ báo nào có lợi thế toàn diện. Đây là nơi Stochastic hỗ trợ — và nơi nó gây hiểu lầm.

Hoạt động tốt nhất

  • Ranging markets
  • With a band or channel filter
  • Short-horizon entries
  • On liquid pairs with tight spreads

Sử dụng cẩn thận

  • Strong one-way trends
  • Fast settings on low timeframes
  • Levels as standalone entries
  • Optimised K/D pairs without validation

Xây dựng chiến lược Stochastic

Kết nối tín hiệu vào quy tắc vào lệnh và thoát lệnh, sau đó xuất EA MT5 có thể biên dịch — không cần code.

  1. Stochastic %K (5 / 3 / 3)
  2. %K below 20 and price at the lower Bollinger band → Open Buy · SL 30 / TP 60
  3. %K above 80 and price at the upper band → Open Sell

Kết hợp Stochastic với các chỉ báo khác

Một chỉ báo hiếm khi đứng một mình. Các cặp kết hợp này bù đắp điểm mù của Stochastic.

Stochastic + Bollinger Bands

  1. %K < 20
  2. Price at lower band
  3. Buy
Lý do
Require price to be statistically stretched at the same moment the oscillator is extreme, so one condition has to agree with the other
Điều kiện tốt nhất
Ranging
Xây dựng chiến lược này →

Stochastic + ADX

  1. ADX < 20
  2. %K < 20
  3. Buy
Lý do
Suppress the fade while a real trend is running, which is exactly when Stochastic pins at an extreme and stays there
Điều kiện tốt nhất
Range filtering

No single-flow template pairs Stochastic with ADX. Start from Stochastic + Bollinger and add an ADX node with a Compare below 20 into the And gate.

Mở Builder →

Stochastic + Moving Average

  1. Price > MA
  2. %K crosses up through 20
  3. Buy
Lý do
Take oscillator signals only in the direction of the higher-timeframe trend, so an extreme never becomes a counter-trend entry
Điều kiện tốt nhất
Trend continuation

No single-flow template pairs Stochastic with a moving average. Add an MA node and a Price node into a Compare, gated with And ahead of the entry.

Mở Builder →

Stochastic + RVI

  1. %K < 20
  2. RVI main crosses above signal
  3. Buy
Lý do
Both publish a main and a signal line and both are read on the crossing, but they measure the close against different things — Stochastic against the high and low of the last n bars, RVI against the open of the bar it closed in. A market can sit at the bottom of its recent range while its individual bars have started closing strongly, and requiring both to turn is a way of asking for that agreement explicitly
Điều kiện tốt nhất
Ranging

No single-flow template pairs them. Start from Stochastic + Bollinger and replace the band condition with two RVI nodes at the same period — one set to Main, one to Signal — joined by a Cross.

Mở Builder →

Tham số

Giá trị ban đầu để xác nhận trên cặp tiền và khung thời gian của bạn — không phải cài đặt được đảm bảo.

Tham số Mặc định Khoảng thử nghiệm đề xuất Chức năng
%K period 5 5–21 How many bars the high–low range is measured over. The MT5 default of 5 is fast; 14 is the common slower alternative.
%D period 3 3–9 Averaging period that turns %K into the signal line. Larger means later but cleaner crossovers.
Slowing 3 1–5 Extra smoothing applied to %K before %D is taken. Slowing 1 is the 'fast' stochastic; 3 is MT5's default and is what most people mean by the indicator.
Overbought / Oversold 80 / 20 70–90 / 10–30 Your levels, not indicator inputs — iStochastic has no threshold argument. Move them together unless you deliberately want an asymmetric rule.

Cài đặt sẵn ban đầu

MT5 default 5 / 3 / 3 Fast, many signals
Classic slow 14 / 3 / 3 Fewer, steadier signals
Smooth 21 / 5 / 5 Swing-level readings only

Ví dụ thị trường

Nơi Stochastic hoạt động, nơi nó thất bại, và bộ lọc thay đổi kết quả như thế nào.

Thành công

Fade in a range

In a sideways market %K drops under 20 while price sits at the lower band, and the move back toward the middle plays out — the case the template describes.

Thất bại

Pinned in a trend

In a strong move %K sits above 80 for bar after bar. Selling each overbought print fights the trend and pays the spread every time.

Đã lọc

Filtered by regime

Add a trend-strength filter and the same run of extremes is ignored while price keeps trending — the filter is what makes a fade survivable.

FAQ

What is the difference between fast and slow stochastic?
Slowing. With slowing set to 1 you get the raw %K — the 'fast' stochastic, which is very noisy. MT5's default of 3 smooths %K before %D is taken, which is what most traders mean by 'the' stochastic. There is no separate indicator; it is one parameter.
Stochastic or RSI — which should I use?
They measure different things. RSI compares the size of gains to losses; Stochastic compares the close to the recent high–low range. Stochastic reacts faster and gives more signals, which helps in ranges and hurts in trends. Neither replaces the other, and using both usually just gives you two versions of the same opinion.
Why does Stochastic stay pinned at 80 for so long?
Because in a trend the close genuinely keeps landing near the top of the range — that is what the indicator is reporting, and it is correct. Reading a pinned oscillator as 'due for a reversal' inverts what it says. Pair it with a regime filter before fading anything.
Does Stochastic have an applied-price setting?
Not in the usual sense. iStochastic takes a price-field selector instead: STO_LOWHIGH uses highs and lows, STO_CLOSECLOSE uses closes only. It also takes an ENUM_MA_METHOD for the smoothing. MT5's default, and the Builder's, is STO_LOWHIGH.
Can I build a Stochastic EA without coding?
Yes for level rules, %K/%D crossovers and centreline crosses — all three are a Stochastic node plus a Compare or Cross node, with periods and levels exposed as EA inputs. Divergence is the exception: it needs multi-bar swing detection the node palette does not cover.
How should I validate settings before going live?
Backtest on quality tick data first, then run the EA on a demo account before risking money. When optimising, hold back data the search never saw and prefer settings that stay profitable across periods over the single in-sample peak — chasing that peak is overfitting the noise. No default or preset here is a performance promise; every value is a starting point to re-validate on your own pair and broker.

Glossary

Thuật ngữ chính