Non Repaint Solar Wind Indicator: EMA And ZigZag

Written by Dominic Walsh · Published · Last updated

The non repaint solar wind indicator puts two familiar tools on one chart. A gold EMA runs through price at `MAPeriod` bars, and a ZigZag traces the swing pivots over the top. Arrows fire when a closed bar crosses the EMA, with `Cooldown` bars enforced between one mark and the next.

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 5: SolarMA, SolarZigZag, Buy, Sell, TrendDot
Alerts popup, push notification, email, sound
Inputs 11

What the Non repaint solar wind Indicator draws on the chart

SolarMA is the gold exponential average running through price.

SolarZigZag is the dodger blue section line joining the swing pivots.

Buy and Sell place lime and red arrows at a closed-bar crossing of the EMA.

TrendDot drops a small aqua marker on every bar, below price when the close leads the EMA and above when it lags.

  • SolarMA: line, gold, width 2
  • SolarZigZag: section, dodger blue, width 2
  • Buy: arrow, lime, width 3, arrow code 233
  • Sell: arrow, red, width 3, arrow code 234
  • TrendDot: arrow, aqua, width 1, arrow code 159
Non repaint solar wind indicator on EURUSD H1 with the gold EMA and ZigZag legs
Non repaint solar wind indicator on EURUSD H1 with the gold EMA and ZigZag legs

How the Non repaint solar wind Indicator calculates its values

Seeding and running the EMA

The code seeds the average with a simple mean over `MAPeriod` `21` bars. alpha then takes 2 over the period plus one, and each newer bar takes alpha times close plus the rest of the previous value. Seeding this way avoids the spike a recursive average shows when it starts from zero.

Tracing the ZigZag pivots

A bar becomes a pivot when no bar within `ZZDepth` `12` on either side beats it. `ZZDeviationPts` at `5.0` sets the minimum move in points before a new leg counts. The section line then joins those pivots, which is what gives the classic swing shape.

Firing on a crossing

crossUp needs the previous close at or below the EMA and the current close above it. crossDown mirrors that. `Cooldown` `3` blocks a second mark until three bars have passed. Every test reads completed bars, which is where the non-repaint claim comes from.

How to read the signals

The gold line gives you the direction and the blue sections give you the structure.

A crossing that lands near a fresh ZigZag pivot carries more context than one mid-leg.

TrendDot below price on a run of bars means the close has stayed above the average.

Raise `Cooldown` when marks cluster during a choppy stretch.

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

`EnableAlerts` ships on with `EnablePopup` carrying the message. `EnablePushNotify`, `EnableEmail` and `EnableSound` are off by default, and `SoundFile` names the clip. The guard allows one message per closed bar.

Every Non repaint solar wind Indicator input

Core settings

Setting What it does Default
MAPeriod Solar MA period (EMA). Bars in the exponential average, default `21`. 21
ZZDepth ZigZag depth (bars window). Bars each side of a ZigZag pivot, default `12`. Raise it for larger swings only. 12
ZZDeviationPts ZigZag deviation (points). Smallest new leg in points, default `5.0`. 5.0
Cooldown bars between signals. Bars enforced between two marks, default `3`. 3

Display settings

Setting What it does Default
ArrowOffsetPts arrow vertical offset (points). Arrow clearance from the bar in points, default `10`. 10

Alert settings

Setting What it does Default
EnableAlerts Master alert switch, default `true`. on
EnablePopup Terminal popup, default `true`. on
EnablePushNotify Mobile push, default `false`. off
EnableEmail Mail delivery, default `false`. off
EnableSound Sound playback, default `false`. off
SoundFile Clip played when sound is on, default `alert.wav`. alert.wav
Non repaint solar wind indicator inputs: MAPeriod, ZZDepth, ZZDeviationPts, Cooldown
Non repaint solar wind indicator inputs: MAPeriod, ZZDepth, ZZDeviationPts, Cooldown

Settings that fit your chart

An average plus a swing tracer suits markets that trend in legs. EURUSD H1 is the reference chart, where `MAPeriod` at `21` covers about a day. On M5 the crossings come fast and `Cooldown` earns its place. On H4 the ZigZag legs span several days and each crossing carries real weight.

When the Non repaint solar wind Indicator fails

ZigZag pivots need `ZZDepth` bars to the right before they confirm, so the newest leg is always provisional.

An average crossing in a range fires in both directions inside a handful of bars.

`Cooldown` hides genuine second signals as readily as it hides noise.

Copy the compiled Non repaint solar wind 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.

Background reading on the method behind the Non repaint solar wind Indicator: Stock market on Wikipedia, Williamsr at Investopedia.

Download the Non repaint solar wind Indicator for MT4 and MT5

The zip holds the compiled Non repaint solar wind 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 Cooldown at 3 prevent?

A second mark within three bars of the last one. Crossings often arrive in pairs when price straddles the average, and the cooldown removes the duplicate. Raise it on fast charts where the close keeps flipping either side of the gold line.

How does ZZDepth decide a pivot?

A bar becomes a pivot when nothing within `ZZDepth` `12` bars on either side prints a higher high or lower low. That means twelve bars of confirmation to the right, so the freshest leg is provisional until those bars close.

Why is MAPeriod seeded with a simple mean?

Because an exponential average calculated from a zero start draws a spike across the first bars of the chart. Seeding with a plain mean over `MAPeriod` `21` bars puts the recursion on a sensible footing, so the gold line begins at a real price level.

What is the TrendDot plot showing?

Which side of the gold line the close sits on, bar by bar. The aqua marker drops below price when the close leads the average and rises above it when the close lags. It gives you the state between crossings without reading the line itself.

Are results guaranteed?

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

Category: this is part of our Signal and Forecast collection. Browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

External 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