ออสซิลเลเตอร์ MomentumMean ReversionTrend Filter มีใน Builder

Relative Strength Index (RSI)

RSI

The RSI is a bounded 0–100 momentum oscillator that measures the speed of recent price changes, used to read overbought and oversold conditions, divergence, and momentum bias — and one of the easiest indicators to turn into a no-code EA.

Default period
14
Common levels
70 / 30
Indicator range
0–100
OverboughtOversoldCentreline 50Divergence

ภาพประกอบ — ข้อมูลสังเคราะห์ ไม่ใช่ราคาจริง

What RSI tells you

RSI compresses recent price action into one bounded number. It compares the size of recent gains to recent losses over a lookback window and plots the result on a fixed 0–100 scale — so you can read at a glance whether momentum is stretched, fading, or turning.

  • Above 70: momentum may be stretched to the upside
  • Below 30: momentum may be stretched to the downside
  • Around 50: balance between buyers and sellers
  1. 1 Price changes bar to bar
  2. 2 Average gains vs average losses
  3. 3 RSI value from 0 to 100
แสดงสูตรและรายละเอียดการคำนวณ

The RSI is derived from the average gain and the average loss over the chosen period — 14 bars by default:

  1. For each bar, record the change from the previous applied price. Positive changes are gains; negative changes are losses, stored as positive numbers.
  2. Compute the average gain and the average loss over the lookback period. Wilder uses a smoothed moving average, so each new bar updates the running averages rather than recomputing from scratch.
  3. Form the Relative Strength: RS = average gain / average loss.
  4. Convert to the bounded index: RSI = 100 − (100 / (1 + RS)).

When the average loss is zero the formula returns 100; when the average gain is zero it returns 0. Wilder’s smoothing is why the RSI needs a few bars to warm up after a chart loads, and why platforms that use a simple average instead of the smoothed one can show tiny differences on the same data. J. Welles Wilder introduced the formula in 1978, and it is unchanged in MetaTrader 5 today.

In MQL5 the call is iRSI(symbol, period, ma_period, applied_price) and it returns a handle to a single buffer. applied_price is a full ENUM_APPLIED_PRICE argument — the step-one price series above is PRICE_CLOSE only because that is the default, not because the indicator is fixed to closes.

สัญญาณ

สัญญาณที่ backtest ได้ของ RSI — และสภาวะตลาดที่เหมาะสมกับแต่ละสัญญาณ

Overbought / Oversold

พร้อมใช้ใน Builder
เงื่อนไข
RSI pushes above 70 or below 30
สภาวะที่ดีที่สุด
Ranging markets
การใช้งานทั่วไป
Fade back toward the mean — with a range or volatility filter

Centreline Crossover

พร้อมใช้ใน Builder
เงื่อนไข
RSI crosses the 50 line
สภาวะที่ดีที่สุด
Trending markets
การใช้งานทั่วไป
Flip momentum bias between bull and bear

Divergence

ตรรกะขั้นสูง
เงื่อนไข
Price makes a new extreme, RSI does not
สภาวะที่ดีที่สุด
Trend exhaustion
การใช้งานทั่วไป
Anticipate a turn before price confirms

Failure Swing

ตรรกะขั้นสูง
เงื่อนไข
A failed retest of an extreme inside the RSI itself
สภาวะที่ดีที่สุด
Either regime
การใช้งานทั่วไป
Read exhaustion without needing price divergence

การทำงานจริงใน MT5

สิ่งที่ MetaTrader 5 คำนวณและวาดจริง — เกณฑ์อ้างอิงของทุกกฎในหน้านี้

บัฟเฟอร์

ดัชนี บัฟเฟอร์ MT5 วาดเป็น เก็บค่าอะไร
0 MAIN_LINE Line The RSI value itself, 0–100. iRSI publishes a single buffer — there is no signal line to copy.

ทำงานได้ดีที่สุด / ใช้อย่างระมัดระวัง

ไม่มีอินดิเคเตอร์ใดที่ได้เปรียบในทุกสภาวะ นี่คือจุดที่ RSI ช่วยได้ — และจุดที่มันทำให้เข้าใจผิด

ทำงานได้ดีที่สุด

  • Ranging markets
  • Clear momentum shifts
  • With a volatility filter
  • With trend confirmation

ใช้อย่างระมัดระวัง

  • Strong one-way trends
  • RSI alone as an entry
  • Low-liquidity periods
  • Optimised settings without validation

สร้างกลยุทธ์ RSI

เชื่อมสัญญาณเข้ากับกฎการเปิดและปิดออเดอร์ จากนั้นส่งออก EA MT5 ที่คอมไพล์ได้ — ไม่ต้องเขียนโค้ด

  1. RSI (14)
  2. RSI below 30
  3. Open Buy · SL 30 / TP 60
  4. RSI above 70 → Open Sell

รวม RSI กับอินดิเคเตอร์อื่น

อินดิเคเตอร์เดี่ยวแทบไม่เพียงพอ การจับคู่เหล่านี้ครอบคลุมจุดบอดของ RSI

RSI + ATR

  1. RSI < 30
  2. ATR contracting
  3. Buy
เหตุผล
Only fade extremes when volatility is contracting, so the RSI is not fighting an expanding trend
สภาวะที่ดีที่สุด
Ranging

No template pairs RSI with ATR yet. The closest ready-made one is Range-filter Reversal (hl_range_reversal), which gates the same RSI entry on a recent high-low range instead.

เปิด Builder →

RSI + Bollinger Bands

  1. Price at lower band
  2. RSI < 30
  3. Buy
เหตุผล
Confirm an RSI extreme with a stretched band touch for a stronger exhaustion read
สภาวะที่ดีที่สุด
Range / reversal

The Bollinger Bounce template trades band touches only — add an RSI node and a Compare node to it to require the momentum confirmation described here.

เปิด Builder →

พารามิเตอร์

ค่าเริ่มต้นสำหรับตรวจสอบบนคู่และกรอบเวลาของคุณเอง — ไม่ใช่การตั้งค่าที่รับประกัน

พารามิเตอร์ ค่าเริ่มต้น ช่วงที่แนะนำให้ทดสอบ หน้าที่
Period 14 2–50 Lookback window for the smoothed average gain and loss. Shorter reacts faster and whipsaws more; longer is smoother and slower.
Applied price Close Close / Open / High / Low / Median / Typical / Weighted Price series the gains and losses are measured on. Close is the MT5 default; the other six are the rest of ENUM_APPLIED_PRICE and all are accepted by iRSI.
Overbought 70 60–90 Upper zone. A reading above it means strong up-momentum, not a guaranteed reversal. This is your level, not an MT5 setting — iRSI has no threshold argument.
Oversold 30 10–40 Lower zone. Strong down-momentum — pair with a filter before fading it. Also your level rather than an indicator input.
Centreline 50 The momentum-bias switch: persistently above 50 is bullish, below is bearish. A convention rather than something to sweep.

ค่าตั้งต้นเริ่มต้น

Fast response 7–9 Reacts quickly, more whipsaw
Standard 14 Wilder's default baseline
Smooth 21+ Fewer, slower signals

ตัวอย่างในตลาด

ที่ RSI ทำงานได้ ที่มันล้มเหลว และตัวกรองเปลี่ยนผลลัพธ์อย่างไร

ทำงานได้

Successful reversal

In a ranging market the RSI drops into oversold, price stalls, and the fade back toward the mean plays out — the textbook mean-reversion case.

ล้มเหลว

False signal in a strong trend

In a one-way trend the RSI sits above 70 for bar after bar. Selling every overbought print here fights the move and donates money.

ถูกกรอง

Filtered setup improvement

Add a trend or volatility filter and the same overbought reading is suppressed while price keeps trending — the filter is what turns a naive fade into a survivable one.

FAQ

What RSI period should I use for an EA?
14 is Wilder's default and the right starting point. Shorter periods (7–9) react faster but whipsaw more; longer periods (21+) are smoother but slower. Treat 14 as a documented baseline to re-validate on your pair and timeframe in a backtest, not as portable truth.
Does RSI above 70 mean I should sell?
No. A reading above 70 means momentum is strong, not that a reversal is due. In a trend the RSI can stay overbought for weeks. Use 70/30 as context and confirm with structure, a trend filter, or divergence before acting.
Can I calculate RSI on something other than the close?
Yes. MQL5's iRSI takes an ENUM_APPLIED_PRICE argument, so RSI can be built from Open, High, Low, Median, Typical or Weighted price as well as Close. Close is the default and by far the most common choice; the others mainly matter when you want the RSI to react to the whole bar's range rather than its settlement.
Is RSI better for trend or mean-reversion EAs?
Both, but differently. Fading 70/30 is a mean-reversion use and needs a range filter or it bleeds in trends; using the 50 line as a momentum-bias switch is a trend use. The same indicator becomes two different strategies depending on which signal you wire in.
Can I build an RSI EA without coding?
Yes, for the level-based signals. The RSI Reversal template wires RSI 14 into buy-below-30 and sell-above-70 rules with the period, levels and applied price exposed as EA inputs, so you can compile, backtest and optimise it per pair without writing MQL5. Divergence and failure swings are the exception — they need multi-bar swing detection that the node palette does not cover.
How should I validate RSI 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.