Independent market intelligence
Research over noise · Risk before return
FOREX INDICATOR GUIDE

Parabolic SAR: the test level, extreme point and acceleration

Parabolic SAR carries a direction state, an extreme point and an acceleration factor from one observed candle to the next. Three EUR/JPY H4 examples distinguish an incoming reversal test from the final plotted dot, and a new extreme from an increase in acceleration.

In simple terms

A SAR dot is a calculated price level. It need not be the level that triggered a reversal, and it does not establish an executed trade. This guide fixes the initialization, touch rule, update order and history policy so the examples can be replayed.

On this page
01

Separate the incoming test, plotted dot and next level

The incoming SAR is the level prepared at the preceding completed observed candle, apart from the initial seed. Test the current candle against that level. The final SAR is the dot recorded after processing this candle; without reversal it equals the incoming level. A reversal can move it elsewhere. The next SAR is prepared afterward for the following observed candle. Up and down describe indicator states, not account positions. A hollow gold marker shows the incoming test only on reversal candles; coloured dots show final SAR by resulting state.

02

Read acceleration as a share of the remaining gap

After processing the candle, form raw next SAR as SAR + AF × (EP − SAR), using post-bar EP and AF. EP is the extreme point for the current direction: a high in an up state or a low in a down state. AF is dimensionless. At 0.02, the raw update covers 2% of the EP-to-SAR gap, not 2% of price or account equity. A range clamp can then restrict that update. An unchanged EP does not by itself stop SAR from moving toward it.

raw_next = SAR_t + AF_t × (EP_t − SAR_t)

03

Increase AF only on a strict continuation extreme

AF starts at 0.02, increases by 0.02 and cannot exceed 0.20. Without a reversal, an up state updates EP only when the current high exceeds EP; a down state does so only when the current low is below EP. That extension increments AF once, subject to the cap. An equal-extreme retest does not increment it, nor does merely completing another candle. A new extreme can therefore be recorded while AF stays capped. Reversal resets are recorded separately from these continuation extensions.

AF_new = min(AF_old + 0.02, 0.20)

04

Clamp the next level against the observed range

In an up state, next SAR is the minimum of raw next SAR, the current low and the preceding observed low. In a down state, use the maximum with the current and preceding highs. The two-row teaching table keeps incoming SAR 90, prior EP 110, prior AF 0.02, current high 112 and low 95. There is no reversal: EP becomes 112 and AF 0.04, so raw next SAR is 90.88. Changing the preceding low from 91 to 90.2 changes the clamp, not that raw projection.

up: next_sar = min(raw_next, L_prev, L_t)
down: next_sar = max(raw_next, H_prev, H_t)

Teaching example: one raw projection, two next levels

Constructed casePreceding observed lowAF after candleRaw next SAR before clampNext SAR after clampNext-level clamp changed raw projection
No next-level clamp91.0000.0490.88000090.880000No
Preceding-low clamp90.2000.0490.88000090.200000Yes
Constructed up-state inputs: incoming SAR 90, prior EP 110, AF 0.02, current high 112 and low 95. The strict extension gives EP 112 and AF 0.04. Raw next SAR is 90.88; preceding low 91 leaves it unchanged, while 90.2 clamps it. Prices are JPY per EUR; AF is dimensionless.
05

Test a touch before updating the old-direction extreme

An incoming up state reverses when the current low is at or below incoming SAR; a down state reverses when the current high is at or above it. Equality counts. Test this before an ordinary EP extension, with at most one reversal per candle. On up-to-down reversal, final SAR is the maximum of prior EP, preceding high and current high; reset EP to current low and AF to 0.02. On down-to-up reversal, use the minimum of prior EP, preceding low and current low; reset EP to current high and AF to 0.02. Reversal takes priority even when the candle also reaches a new extreme in the old direction.

up: L_t ≤ incoming_sar; down: H_t ≥ incoming_sar

Teaching example: equality reverses before an EP extension

Constructed caseCurrent lowIncoming reversal-test levelState reversalFinal plotted SARAF after candle
Low above incoming test level95.10095.000000No95.0000000.14
Low equals incoming test level95.00095.000000Yes112.0000000.02
Low below incoming test level94.90095.000000Yes112.0000000.02
Constructed up state: incoming SAR 95, prior EP 110, AF 0.12, preceding high 109 and low 96, current high 112 and close 100. Only current low changes. At 95.1, SAR stays 95 and AF becomes 0.14; at 95 or 94.9, reversal plots SAR 112 and resets AF to 0.02. Prices are JPY per EUR and AF is dimensionless; these are teaching inputs, not trades.
06

Make the bootstrap and full history explicit

We use an explicit TA-Lib-style bootstrap. The first observed candle has no SAR or state output. On the second, compare downMove=L0−L1 with upMove=H1−H0. Prefer down only when downMove is positive and greater than upMove; otherwise prefer up, including ties. For an up seed, incoming SAR is L0 and EP is H1; for down, they are H0 and L1. Start AF at 0.02 and process that second candle through the ordinary reversal test, so the preference can immediately reverse. Only in this first iteration, both output and next-level clamps use H1/L1 as the preceding reference again. Later iterations use the actual preceding candle. Replay the supplied history from its beginning: SAR is path-dependent, not a fixed 20-bar window. Matching parameters does not establish platform parity.

downMove = L0 − L1; upMove = H1 − H0
initial_down = (downMove > 0) and (downMove > upMove)

07

Keep the Bid source and its limits visible

The pinned HistData Bid source contains 10,592 H4 candles from 7 annual files. There are 2,364 candles with fewer than 240 source-minute rows and 353 calendar gaps. Prices are JPY per EUR. The provider uses fixed EST without daylight-saving changes; the archived conversion adds five hours for UTC. First and last source-minute stamps label intervals, not individual executions. We keep observed partial candles and calendar gaps, without filling absent rows or resetting at weekends. A gap need not be a provider error. Original ZIP files are not downloaded again.

08

This up reversal has distinct test and plotted levels

The first eligible up reversal since 2023 is available at 2023-01-04 16:00 UTC. High 140.032 meets the incoming test 139.039924, and the down state reverses up. Final SAR is 137.382000. EP resets from 137.382000 to 140.032000; AF resets from 0.06 to 0.02. This EP reset is not a continuation extension. Raw next SAR 137.435000 becomes next SAR 137.435000 after the range clamp. All these price levels are JPY per EUR; AF has no price unit.

Down-to-up: incoming test level and final dot differ

Final SAR · colour follows resulting stateIncoming test level on reversal · hollow gold marker

Down-to-up: incoming test level and final dot differCandles are evenly spaced in observed order. Calendar gaps are compressed and marked by dashed lines; no missing candles are added. Outlined bodies mark partial source-minute buckets. Coloured dots show final SAR by resulting state. Hollow gold markers show incoming test levels only on reversal candles. AF uses a step path.EUR/JPY Bid · JPY per EUR136.847138.452140.057141.661143.266Calendar gap: 2022-12-30 20:00 → 2023-01-01 20:00 UTCPost-bar AF · dimensionless · step path0.000.050.100.150.20S2022-12-29 12:002023-01-04 12:002023-01-05 08:00

Calendar gap Candles are evenly spaced in observed order. Calendar gaps are compressed and marked by dashed lines; no missing candles are added. Outlined bodies mark partial source-minute buckets. Coloured dots show final SAR by resulting state. Hollow gold markers show incoming test levels only on reversal candles. AF uses a step path.

Select a candle, move the slider or use arrow keys. OHLC has three decimals, SAR and EP six, AF two. S stays on the completed reference candle; the cursor and details follow your selection. Price and AF scales stay fixed. The first source row has unavailable state values.

Interval anchor · UTC
2023-01-04 12:00 UTC
Scheduled interval end · UTC
2023-01-04 16:00 UTC
First source-minute interval label · UTC
2023-01-04 12:00 UTC
Last source-minute interval label · UTC
2023-01-04 15:59 UTC
Open
138.418
High
140.032
Low
138.409
Close
139.971
Source-minute rows · maximum 240
240
Direction state before candle
Down state
Incoming reversal-test level
139.039924
EP before candle
137.382000
AF before candle
0.06
Direction state after candle
Up state
Final plotted SAR
137.382000
EP after candle
140.032000
AF after candle
0.02
State reversal
Yes
Strict continuation EP extension
No
Raw next SAR before clamp
137.435000
Next SAR after clamp
137.435000
Next-level clamp changed raw projection
No
First eligible case, available 2023-01-04 16:00 UTC. Current low is 138.409 and close 139.971 JPY per EUR. S marks the fixed completed reference candle. The incoming gold marker and final coloured dot represent different stages; later candles provide context.
09

A wick can reverse the state while the close stays above the test

At 2023-01-27 16:00 UTC, low 140.816 reaches the incoming level 140.843742, although close 140.879 remains above it. The up state reverses down. Final SAR 141.910000 is different from the test level. EP resets from 141.910000 to 140.816000, and AF starts the new state at 0.02, having been 0.02. Raw next SAR is 141.888120; next SAR is 141.888120. Price levels use JPY per EUR. The close does not override this high/low rule or identify an execution time.

The low reverses the state although the close stays above the test level

Final SAR · colour follows resulting stateIncoming test level on reversal · hollow gold marker

The low reverses the state although the close stays above the test levelCandles are evenly spaced in observed order. Calendar gaps are compressed and marked by dashed lines; no missing candles are added. Outlined bodies mark partial source-minute buckets. Coloured dots show final SAR by resulting state. Hollow gold markers show incoming test levels only on reversal candles. AF uses a step path.EUR/JPY Bid · JPY per EUR138.421139.477140.532141.587142.643Calendar gap: 2023-01-27 20:00 → 2023-01-29 20:00 UTCPost-bar AF · dimensionless · step path0.000.050.100.150.20S2023-01-23 08:002023-01-27 12:002023-01-30 04:00

Calendar gap Candles are evenly spaced in observed order. Calendar gaps are compressed and marked by dashed lines; no missing candles are added. Outlined bodies mark partial source-minute buckets. Coloured dots show final SAR by resulting state. Hollow gold markers show incoming test levels only on reversal candles. AF uses a step path.

Select a candle, move the slider or use arrow keys. OHLC has three decimals, SAR and EP six, AF two. S stays on the completed reference candle; the cursor and details follow your selection. Price and AF scales stay fixed. The first source row has unavailable state values.

Interval anchor · UTC
2023-01-27 12:00 UTC
Scheduled interval end · UTC
2023-01-27 16:00 UTC
First source-minute interval label · UTC
2023-01-27 12:00 UTC
Last source-minute interval label · UTC
2023-01-27 15:59 UTC
Open
141.327
High
141.366
Low
140.816
Close
140.879
Source-minute rows · maximum 240
240
Direction state before candle
Up state
Incoming reversal-test level
140.843742
EP before candle
141.910000
AF before candle
0.02
Direction state after candle
Down state
Final plotted SAR
141.910000
EP after candle
140.816000
AF after candle
0.02
State reversal
Yes
Strict continuation EP extension
No
Raw next SAR before clamp
141.888120
Next SAR after clamp
141.888120
Next-level clamp changed raw projection
No
First eligible case, available 2023-01-27 16:00 UTC. Current high is 141.366 JPY per EUR. The incoming marker is the level tested; the final dot follows reversal processing. S stays fixed, and later candles provide context.
10

A new extreme need not raise an already capped AF

At 2023-01-02 16:00 UTC, the down state continues. Low 139.383 establishes EP 139.383000, below prior EP 139.609000. AF was already 0.20 and remains 0.20. Incoming SAR 140.340196 is also final SAR 140.340196, because no reversal occurs. Raw next SAR 140.148757 and next SAR 140.148757 concern the following observed candle. Price levels use JPY per EUR. This is the first eligible match of the declared condition, without searching for a later price outcome.

A strict new low while AF remains capped

Final SAR · colour follows resulting stateIncoming test level on reversal · hollow gold marker

A strict new low while AF remains cappedCandles are evenly spaced in observed order. Calendar gaps are compressed and marked by dashed lines; no missing candles are added. Outlined bodies mark partial source-minute buckets. Coloured dots show final SAR by resulting state. Hollow gold markers show incoming test levels only on reversal candles. AF uses a step path.EUR/JPY Bid · JPY per EUR136.827138.493140.159141.825143.491Calendar gap: 2022-12-30 20:00 → 2023-01-01 20:00 UTCPost-bar AF · dimensionless · step path0.000.050.100.150.20S2022-12-27 12:002023-01-02 12:002023-01-03 08:00

Calendar gap Candles are evenly spaced in observed order. Calendar gaps are compressed and marked by dashed lines; no missing candles are added. Outlined bodies mark partial source-minute buckets. Coloured dots show final SAR by resulting state. Hollow gold markers show incoming test levels only on reversal candles. AF uses a step path.

Select a candle, move the slider or use arrow keys. OHLC has three decimals, SAR and EP six, AF two. S stays on the completed reference candle; the cursor and details follow your selection. Price and AF scales stay fixed. The first source row has unavailable state values.

Interval anchor · UTC
2023-01-02 12:00 UTC
Scheduled interval end · UTC
2023-01-02 16:00 UTC
First source-minute interval label · UTC
2023-01-02 12:00 UTC
Last source-minute interval label · UTC
2023-01-02 15:59 UTC
Open
139.728
High
139.758
Low
139.383
Close
139.418
Source-minute rows · maximum 240
240
Direction state before candle
Down state
Incoming reversal-test level
140.340196
EP before candle
139.609000
AF before candle
0.20
Direction state after candle
Down state
Final plotted SAR
140.340196
EP after candle
139.383000
AF after candle
0.20
State reversal
No
Strict continuation EP extension
Yes
Raw next SAR before clamp
140.148757
Next SAR after clamp
140.148757
Next-level clamp changed raw projection
No
First eligible case, available 2023-01-02 16:00 UTC. Current high is 139.758 and close 139.418 JPY per EUR. The state continues with a new EP, while the AF step remains at its cap. S stays on the completed reference candle.
11

Keep exact comparisons distinct from displayed precision

Source prices are integers scaled by 1000000; the replay uses exact Fraction arithmetic for projections, comparisons and AF. Published numeric fields are display representations. OHLC shows three decimals, SAR and EP six, and AF two. Rounded equality does not decide a touch or a strict new extreme. SAR dots are separate points, not joined lines. The lower panel shows post-bar AF as a step path on a fixed 0–0.20 axis. Price and AF scales stay fixed while selecting candles; calendar gaps and partial buckets retain their markers.

12

Replay the state before adding trading rules

For each case, select the first distinct matching candle starting on or after 2023-01-01 UTC. Only the selected and immediately preceding buckets must be adjacent scheduled H4 intervals with all 240 minute rows, from the anchor through 239 minutes later. The display requires 25 earlier and five later observed candles; other context rows may be partial or separated by gaps. Later prices, quality and returns do not rank the selection. The source was already used in another strategy, so these are retrospective examples. Downloads provide pinned inputs, CSV, replay and independent checks. No orders, fills, costs or returns are calculated.

python3 sar-guide-replay.py --protocol sar-guide-protocol.json --source-evidence eurjpy-aroon-evidence.json --output replay.json
python3 sar-guide-independent-check.py --protocol sar-guide-protocol.json --source-evidence eurjpy-aroon-evidence.json --evidence replay.json --report check.json

Frequently asked questions

Does a close have to cross SAR for a reversal?

No. This convention tests the candle’s low or high against incoming SAR. A wick can meet the condition while the close stays on the other side. Completed OHLC does not reveal the exact intrabar trigger time.

Does an exact touch reverse on every platform?

No universal agreement is assumed. This guide includes equality, while some published implementations describe strict crossings. Initialization and clamp order also differ. Matching AF settings alone does not make their dots identical.

Does AF 0.02 mean risking 2% of the account?

No. It is a multiplier on the EP-to-SAR gap in the recurrence. It defines neither position size nor account risk. The range clamp can also make the final next-level movement smaller than the raw update.

Why can a different history start change later dots?

The carried direction, EP, AF and prepared SAR depend on earlier transitions. Starting a short chart afresh can create a different seed and state path. The guide therefore replays the full pinned history instead of restarting at the displayed window.

Does a flat candle cause division by zero?

No. This recurrence does not divide by the candle’s high–low range. A flat candle remains valid. Under the touch-inclusive rule, a fully flat sequence can alternate states while its SAR dots coincide. The first source row is unavailable because of initialization.

Is an indicator flip an executed stop-and-reverse trade?

No. Incoming test and final dot are calculated levels. An order needs separate trigger, fill, sizing and cost rules. Bid OHLC does not establish ask prices, intrabar order or a fill through a gap; this guide calculates indicator states only.

Primary sources

Download data and reproduction files

Created by the MyProfitFactor editorial team.

Copying or republication without attribution and an active link to the original material is prohibited. Usage policy.