The binary arrow indicator reads two things at the close of a bar and marks it if both agree. A fast Stochastic has to leave an extreme, and a short EMA has to be sloping the same way. Binary Buy and Binary Sell mark the setup bar, with the EMA Filter drawn alongside.
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 | 3: EMA Filter, Binary Buy, Binary Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 13 |
What the Binary Arrow Indicator draws on the chart
EMA Filter is the short average over InpEmaPeriod bars, drawn over the candles.
Binary Buy (lime) sits under the low of a qualifying setup bar.
Binary Sell (red) sits above the high on the opposite side.
A text object labels each marker on the chart.
- EMA Filter: line, gold, width 1
- Binary Buy: arrow, deep sky blue, width 3, arrow code 233
- Binary Sell: arrow, red, width 3, arrow code 234

How the Binary Arrow Indicator calculates its values
Leaving the extreme
The first condition looks at the fast Stochastic across two closed bars. A buy needs the reading below InpOversold on the earlier bar and back above it on the later one.
Selling mirrors that around InpOverbought. The point is the exit from an extreme rather than sitting inside one, which is a different event from a plain oversold reading.
The slope filter
The second condition compares the EMA against its own previous value. Rising qualifies a buy and falling qualifies a sell.
At InpEmaPeriod 5 that average turns quickly, so the filter removes setups fighting the immediate direction rather than the larger trend.
Reading at the close
Both checks run on bars that have finished, which is what suits the next-bar expiry style this arrow engine was built for.
InpArrowOffset then spaces the marker from the candle by a fixed number of points.
How to read the signals
An arrow means both conditions lined up on that closed bar, nothing about what follows.
The EMA Filter slope is visible, so you can see which setups the filter would have removed.
Clusters of markers usually mean the Stochastic is oscillating across a boundary rather than a run of distinct setups.
A long gap without markers usually means the two conditions kept disagreeing, not that the market was quiet.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
Alerts cover popup, push, email and sound. A bar time check runs first, so a setup produces one alert per closed bar.
Every Binary Arrow Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpKPeriod |
Stochastic %K period. InpKPeriod is the Stochastic lookback. It defaults to 14. | 14 |
InpDPeriod |
Stochastic %D period. InpDPeriod smooths the signal side, 3 by default. | 3 |
InpSlowing |
Stochastic slowing. InpSlowing smooths the raw reading before it is used, also 3. | 3 |
InpOverbought |
Overbought level. InpOverbought is the upper extreme the reading has to leave for a sell, 80.0 by default. | 80.0 |
InpOversold |
Oversold level. InpOversold is the lower extreme for a buy at 20.0. | 20.0 |
InpEmaPeriod |
Short EMA period (direction filter). InpEmaPeriod sets the filter average, 5 by default. Raising it makes the filter slower and stricter. | 5 |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpArrowOffset |
Arrow offset (points). InpArrowOffset is the cosmetic gap between a marker and its candle, 55 points by default. | 55 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
EnableAlerts |
(see inputs panel) | on |
EnablePopup |
(see inputs panel) | on |
EnablePushNotify |
(see inputs panel) | off |
EnableEmail |
(see inputs panel) | off |
EnableSound |
(see inputs panel) | off |
SoundFile |
(see inputs panel) | alert.wav |

Settings that fit your chart
The screenshot uses EURUSD H1. A 14 bar Stochastic with a 5 bar filter is a fast pairing that suits intraday charts where the reading reaches its boundaries often. On H4 and daily the setups become rare. On M1 the filter turns as quickly as the Stochastic and stops removing much of anything.
When the Binary Arrow Indicator fails
A five bar filter turns almost as fast as the signal it is filtering, so it removes fewer setups than a longer average would.
Leaving an extreme happens constantly in a range, which is where this prints most of its markers and where they are worth least.
A trend pins the reading at one boundary, so exits against that trend keep qualifying while price continues.
Two conditions is a thin confluence. Nothing here measures volatility, structure or session.
Copy the compiled Binary Arrow 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 Binary Arrow Indicator: Naive diversification on Wikipedia, Swingtrading at Investopedia.
Download the Binary Arrow Indicator for MT4 and MT5
The zip holds the compiled Binary Arrow 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.
FAQ
Why must the reading cross back over InpOversold to qualify?
Sitting below InpOversold only says selling has dominated recently, and it can stay there for a long run. Crossing back above it is a change of state. The code checks the earlier closed bar was below and the later one above, so the marker lands on the turn.
What does InpEmaPeriod 5 filter out in practice?
Setups where the short average is sloping against them. At five bars it turns quickly, so it removes the ones fighting the immediate direction rather than the larger trend. Raising it towards 20 makes the filter stricter and cuts the marker count sharply.
Does the EMA Filter line affect where the arrows sit?
No. The line is the filter’s own reading, drawn so you can see what it is doing. Marker placement comes from the bar low or high offset by InpArrowOffset, which is 55 points by default and purely cosmetic.
Does the EMA Filter resolve on closed bars only?
It was built that way: both checks resolve on bars that have already closed, so the setup is fixed when the bar ends. Whether the following bar goes the same way is a separate question this tool does not measure.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Binary Arrow Indicator as one input. Always backtest before trading live.
External references
- For background on this concept, see Naive diversification on Wikipedia.
- For broader market context, see Swingtrading at Investopedia.
