趋势 TrendTrailing StopReversal 在 Builder 中可用

Parabolic SAR

SAR

Parabolic SAR prints a dot on the opposite side of price and pulls it closer every bar, until price touches it and the dot jumps to the other side. It was designed as a trailing stop first and an entry signal second, and MT5 exposes it with two acceleration inputs and no period at all.

Step / maximum
0.02 / 0.2
Period
None
Scale
Price
Parabolic SAR (0.02 / 0.2)Trend threshold 25ADX(14) — trend filter

示意性 — 合成数据,非实时报价。

What Parabolic SAR tells you

SAR answers one question per bar: where would the stop have to sit for this trend to still be intact? It places that level on the far side of price and drags it closer every bar, faster each time the trend makes a new extreme. When price finally reaches the level, the indicator declares the trend over and puts the dot on the other side.

  • Dots below price: the current trend reading is up
  • Dots above price: it is down
  • SAR is always on one side or the other — it never reports 'no trend'
  1. 1 Track the extreme reached in the current trend
  2. 2 Pull the stop toward it, accelerating each new extreme
  3. 3 Flip sides the moment price touches the stop
显示公式与计算详情

Parabolic SAR is a stop level that walks toward price, and it is defined recursively rather than as an average:

  1. Fix the direction of the current trend and the extreme point (EP) reached so far — the highest high in an uptrend, the lowest low in a downtrend. Set the acceleration factor (AF) to the step, 0.02 by default.
  2. Move the stop a fraction of the way to that extreme: SAR = SARprev + AF × (EP − SARprev).
  3. Every time the trend posts a new extreme, raise AF by one step, up to the maximum (0.2 by default). The stop therefore closes in faster the longer the trend runs.
  4. Clamp the result so the stop can never sit inside the previous two bars’ range — without this, a wide bar could place the stop where it would be triggered immediately.
  5. If price reaches the stop, flip: the trend direction reverses, the new SAR becomes the old EP, the EP resets to the current bar’s extreme, and AF resets to the step.

The consequence of step 3 is the whole character of the indicator. Early in a move the dots trail loosely; by the time the trend has posted many new extremes they are tight against price, so the same setting that gives a young trend room will exit a mature one on a shallow pullback. That is deliberate — Wilder’s point was that a trend that has already run deserves less rope.

In MQL5 the call is iSAR(symbol, period, step, maximum) and it returns a handle to one buffer. There is no applied-price argument, because the calculation reads highs and lows directly, and there is no period argument at all — step and maximum are rates of acceleration, not lookback windows. That makes SAR one of the few MT5 indicators where “what period should I use?” has no answer, and where tuning changes how quickly the tool gives up on a trade rather than how much history it considers.

信号

SAR 提供的可回测信号 — 及每个信号适合的市场状态。

Flip to the Other Side

Builder 可实现
条件
Price touches the dots and SAR jumps across
最佳市场状态
Trending markets
典型用法
Reverse direction on a single unambiguous event

Which Side the Dots Are On

Builder 可实现
条件
SAR sits below price, or above it
最佳市场状态
Established trends
典型用法
Use the side as a directional gate for a faster entry rule

SAR as the Trailing Stop

Builder 可实现
条件
The stop is moved to the current dot on every bar
最佳市场状态
Trend continuation
典型用法
Let the indicator manage the exit instead of a fixed distance

Acceleration and Dot Spacing

高级逻辑
条件
The gap between dots narrows as the acceleration factor climbs
最佳市场状态
Mature trends
典型用法
Read how committed the indicator already is before joining late

MT5 实现

MetaTrader 5 实际计算和绘制的内容——本页每条规则的依据。

缓冲区

索引 缓冲区 MT5 中的绘制方式 存放内容
0 MAIN_LINE Dots The stop level for the current bar, plotted on the price scale. MT5 draws it as one dot per bar and never joins them, because the series jumps sides on a flip — there is no continuous line to draw.

平台说明

最佳适用场景 / 谨慎使用

没有任何指标具有普适优势。以下是 SAR 发挥作用的场景 — 以及可能误导的场景。

最佳适用场景

  • Sustained, directional trends
  • As a trailing-stop rule rather than an entry
  • Higher timeframes where flips are rarer
  • Paired with something that says whether a trend exists

谨慎使用

  • Ranges, where it flips on nearly every swing
  • As a standalone entry with no trend filter
  • Treating the dots as support or resistance
  • Raising step to 'make it faster' without re-testing

构建 SAR 策略

将信号接入进场和出场规则,然后导出可编译的 MT5 EA — 无需编写代码。

  1. Parabolic SAR (step 0.02 / maximum 0.2)
  2. Bid price crossing the SAR
  3. ADX above 25
  4. Price crosses above the SAR and ADX confirms → Open Buy · SL 50 / TP 150
  5. Price crosses below the SAR and ADX confirms → Open Sell
  6. Stop then trails behind the SAR dots for the life of the position

将 SAR 与其他指标组合

单一指标很少独立有效。这些组合弥补了 SAR 的盲点。

SAR + ADX

  1. ADX > 25
  2. Price crosses the SAR
  3. Buy
原因
Let a strength reading decide whether a trend exists at all before acting on a flip, because SAR flips just as confidently in a flat market as in a real move
最佳市场状态
Trending
构建此策略 →

SAR + Moving Average

  1. Price above the MA
  2. SAR flips below price
  3. Buy
原因
Take only the flips that agree with a slower directional read, which removes the counter-trend half of the reversals
最佳市场状态
Trending

No single-flow template pairs SAR with a moving average. Start from SAR Flip + ADX and swap the ADX condition for an MA node with a Compare against price, or add it as a third input to the And gate.

打开 Builder →

SAR + ATR

  1. Price crosses the SAR
  2. ATR sets the initial stop
  3. Buy
原因
Keep SAR for the exit and let volatility set the initial stop, so the first stop is not tighter than the instrument's normal bar range
最佳市场状态
Any

No single-flow template pairs SAR with ATR. Start from SAR Flip + ADX and add an ATR node feeding a risk-based lot or stop node — the Fractal Breakout + ATR template shows that wiring.

打开 Builder →

参数

在您自己的货币对和时间框架上验证的起始值 — 非保证设置。

参数 默认值 建议测试范围 功能说明
Step 0.02 0.005–0.05 How much the acceleration factor grows each time the trend posts a new extreme. Larger values drag the stop in faster, so trends are cut shorter and flips happen more often. This is a rate, not a lookback window.
Maximum 0.2 0.1–0.5 The ceiling on the acceleration factor. It bounds how tight the stop can ever get, which matters most in long trends where the factor would otherwise keep climbing until the stop sits on top of price.
Shift 0 0–3 Which bar back the node reads the buffer from. Shift 1 evaluates against a fully closed bar. This is the node's read offset, not an argument to iSAR.

初始预设

Patient 0.01 / 0.1 Wider stop, fewer flips, later exits
Standard 0.02 / 0.2 Wilder's original and MT5's default
Aggressive 0.04 / 0.4 Tight stop, many flips — usually too many

市场示例

SAR 有效的场景、失效的场景,以及过滤器如何改变结果。

有效

One flip, one long trend

SAR flips below price as a range resolves and the dots stay under price for the whole leg, tightening as the move extends — the case the indicator was designed for.

失效

Flipping every other bar

In a tight range price keeps touching the dots and SAR reverses repeatedly. Each flip is a full reversal in the classic system, which is why an unfiltered SAR bleeds in chop.

已过滤

Strength filter suppresses the flips

With a trend-strength condition attached, the same cluster of flips is ignored while the market goes nowhere, and only the flip that begins the real move is acted on.

FAQ

What do step and maximum actually change?
They control the acceleration factor, which is the fraction of the distance between the stop and the trend's extreme that the stop closes each bar. Step is how much that fraction grows on every new extreme; maximum is its ceiling. A larger step tightens the stop sooner and produces more flips; a larger maximum lets a long trend eventually be stopped out on a small pullback. Neither is a lookback period, and neither makes the indicator 'see' more history.
Why does SAR whipsaw so badly?
Because it has no concept of a market without a trend. SAR is always on one side of price or the other, so in a range it simply alternates, and in the classic stop-and-reverse form every alternation is a full position reversal. The indicator is not malfunctioning — it is answering the question it was built for, which assumes a trend exists. Deciding whether one exists is a job for something else, which is why the Builder template gates it behind ADX.
Are the dots support and resistance levels?
No. A SAR dot is a stop level derived from the trend's own extreme and an acceleration factor — it has nothing to do with where buyers or sellers previously transacted. It can coincide with a structural level, but treating it as one leads to placing entries at dots, which is the opposite of what the value means.
Can SAR be used as a trailing stop in an EA?
Yes, and that is its original purpose. The Builder's trailing-stop node has a Parabolic SAR mode that moves the stop to the current dot each bar, with its own step and maximum exposed as EA inputs. The SAR Flip + ADX template uses exactly that for the exit, so the indicator manages the trade after entry instead of a fixed pip distance doing it.
Can I build a Parabolic SAR EA without coding?
Yes for the flip and for the trailing stop. The SAR Flip + ADX template wires a SAR node against the Bid price with Cross nodes, gates both directions on ADX above 25, and trails the stop with a second SAR — step, maximum and the ADX period are all EA inputs. Counting flips or measuring dot spacing over several bars is the exception and needs custom MQL5.
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. Be especially careful optimising step and maximum: because they change trade count as well as trade quality, a setting can look better purely by trading less on one window. Hold back data the search never saw and prefer settings that stay profitable across periods over the single in-sample peak. No default or preset here is a performance promise.

Glossary

关键术语