Accurate Swing Trading System Indicator: Break A Pivot

Written by Dominic Walsh · Published · Last updated

The accurate swing trading system indicator waits for two things. Price must break the last confirmed swing. It must also sit on the correct side of a slow average at the time, which keeps the break pointing with the wider move.

This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.

Platforms MT4 (.ex4) + MT5 (.ex5)
Chart window Main price chart
Plots 4: Swing trend EMA, Swing line, BUY (swing high break), SELL (swing low break)
Alerts popup, push notification, email, sound
Inputs 18

The chart side of it

A dark orange `Swing trend EMA` runs at `TrendEma` `100`.

A deep sky blue `Swing line` joins the confirmed pivots.

`BUY (swing high break)` uses arrow 233 in lime.

`SELL (swing low break)` uses arrow 234 in red.

  • Swing trend EMA: line, width 2
  • Swing line: section, width 2
  • BUY (swing high break): arrow, width 2, arrow code 233
  • SELL (swing low break): arrow, width 2, arrow code 234
Accurate swing trading system indicator swing line, average and break arrows on EURUSD H1.
Accurate swing trading system indicator swing line, average and break arrows on EURUSD H1.

How the Accurate swing trading system Indicator calculates its values

Pivots come from both sides

`PivotLookback` `5` asks a bar to beat five neighbours either side. The swing line then joins each confirmed pivot to the next, alternating between highs and lows.

The break needs two bars

A buy needs the current close above the last swing high while the previous close sat at or below it. That pairing turns a level into an event.

The average filters direction

Price must also close above `TrendEma` `100` for a buy. So a break against the wider move produces nothing, which is what the word system in the name is doing.

Reading the plots

The swing line is drawn history, so its last leg stays provisional.

`MinBarsBetween` `5` spaces same-side marks apart.

A break with the average agreeing is the whole setup.

Marks sit `ArrowOffsetPts` `40` points from the bar.

Alert channels in this build: popup, push notification, email and sound, one message per closed bar.

`EnableAlerts` is the master switch and ships true with `EnablePopup`. `EnablePushNotify` reaches a phone, `EnableEmail` posts mail and `EnableSound` plays `SoundFile`. Those three arrive off. Breaks report once a bar.

Every Accurate swing trading system Indicator input

Core settings

Setting What it does Default
PivotLookback Bars each side that confirm a swing pivot. Bars either side confirming a pivot, default `5`. 5
TrendEma EMA period used as the trend bias. Bars in the direction filter, default `100`. 100
MinBarsBetween Minimum closed bars between same-side arrows. Closed bars before another same-side mark, default `5`. 5

Display settings

Setting What it does Default
ShowSwingLine Draw the zigzag swing line. Draw the zigzag swing line, default `true`. on
ShowTrendLine Draw the trend EMA. Draw the trend average, default `true`. on
ShowSignals Plot the breakout arrows. Plot the breakout marks, default `true`. on
ArrowOffsetPts Arrow offset from the bar (points). Points between a mark and the bar, default `40`. 40
TrendColor Trend EMA color. dark orange
SwingColor Swing line color. deep sky blue
BuyColor BUY arrow color. lime
SellColor SELL arrow color. red

Alert settings

Setting What it does Default
MaxBars History bars to scan (0 = all). History the scan covers, default `800`. 800
EnableAlerts Master alert switch. Master switch over the break alerts, default `true`. on
EnablePopup Popup alert. Terminal message on a break, default `true`. on
EnablePushNotify Push notification to phone. off
EnableEmail Email alert. off
EnableSound Sound alert. off
SoundFile Sound file. alert.wav
Accurate swing trading system indicator inputs panel with PivotLookback and TrendEma.
Accurate swing trading system indicator inputs panel with PivotLookback and TrendEma.

Which markets and timeframes suit it

A hundred-bar average is a slow filter. EURUSD H1 is the reference chart, where it covers four days. On M5 the filter still works but the pivots come thick. H4 gives a handful of breaks a month.

When to distrust it

A five-bar pivot confirms five bars late, so the level is never fresh.

The average filter blocks the first break of a genuine reversal, every time.

The word accurate in the name is a claim the code cannot support.

Copy the compiled Accurate swing trading system Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.

Download the Accurate swing trading system Indicator for MT4 and MT5

The zip holds the compiled Accurate swing trading system Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.

Download this indicator free

Enter your email and the file is yours. You also get the full MT4 and MT5 library.

  • 1,380+ indicators
  • MT4 and MT5 files
  • No spam, unsubscribe any time

FAQ

What does TrendEma 100 block?

Any break pointing against the wider move. A close through the last swing high still produces nothing unless price also sits above the hundred-bar average, which is the filter half of the setup.

Why does PivotLookback 5 delay the level?

A swing needs five newer bars to close without beating it. So the level a break tests is always at least five bars old, and the first break of a very fresh high goes unmarked.

Does ShowSwingLine affect the signals?

No. It controls the drawn zigzag only. The pivot detection and the break test run either way, so switching it off gives you arrows and the average on a cleaner chart.

What does MinBarsBetween 5 stop?

Repeated marks during a strong run, where price breaks a series of rising swing highs bar after bar. Five bars of spacing turns that into a handful of arrows.

Are results guaranteed?

No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Accurate swing trading system Indicator as one input. Always backtest before trading live.

Authoritative references

Dominic Walsh - Forex trader and MT4/MT5 developer

About the author

Written by Dominic Walsh, a Forex trader and MT4/MT5 indicator, Expert Advisor and script developer. Every tool on forexmt4systems.com is tested on live charts before release and ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files. Learn more about the trader and developer behind this site.

How we build, test and correct every tool: Editorial & Testing Policy. Trading carries risk; see the disclaimer.

Leave a Comment