AFI Stochastic Indicator MT4 + MT5

The AFI Stochastic plots a Stochastic oscillator (%K and %D) with 20/50/80 levels and alerts only on %K/%D crosses near the oversold or overbought zone, filtering out the mid-range noise a raw Stochastic throws.

For more like this, browse the more oscillators indicators for forex or jump to the full all MetaTrader indicators.

What the AFI Stochastic Indicator does on the chart

The AFI Stochastic indicator plots a Stochastic oscillator (%K and %D) in a separate window with 20/50/80 reference levels, measuring where the close sits inside the recent high-low range.

It alerts only when %K crosses %D near the oversold or overbought zone, filtering out the mid-range crosses that are usually noise.

Key features and settings

  • %K and %D Stochastic lines
  • 20 / 50 / 80 grid
  • BUY alert on %K cross up near oversold
  • SELL alert on %K cross down near overbought
  • Adjustable %K, %D, slowing
  • Full alert system: popup, push notification to mobile MetaTrader, email, and sound — all four channels toggle independently from the inputs panel. Alerts fire once per closed bar so you never get spammed mid-tick.
  • Built for both MT4 and MT5; works on every timeframe and every symbol your broker offers.
  • Lightweight code that does not slow down the chart.
Setting Description Default
KPeriod %K lookback 14
DPeriod %D smoothing 3
Slowing Slowing factor 3
OverBought Overbought threshold 80
OverSold Oversold threshold 20
EnableAlerts Master toggle for the alert system true
EnablePopup MT4/MT5 popup dialog on signal true
EnablePushNotify Mobile push notification (configure MetaQuotes ID first) false
EnableEmail SMTP email (configure Tools -> Options -> Email) false
EnableSound Play .wav from MT4/Sounds on signal false

How to read signals from the AFI Stochastic Indicator

AFI Stochastic Indicator - buy and sell signals example chart
Buy/sell signals example

Also, the signal is the %K/%D cross near an extreme.

Entry idea (long). %K crosses above %D below 20.

Entry idea (short). %K crosses below %D above 80.

Exit idea. Exit at the opposite extreme.

Tuning the AFI Stochastic Indicator inputs

Start with the defaults, then tune for your market. In practice, KPeriod (default 14) sets the averaging length — raise it for smoother, slower signals or lower it for faster, more sensitive ones; DPeriod (default 3) sets the averaging length — raise it for smoother, slower signals or lower it for faster, more sensitive ones; Slowing (default 3) sets the averaging length — raise it for smoother, slower signals or lower it for faster, more sensitive ones. Every alert channel — pop-up, sound, email and mobile push — toggles independently in the same inputs panel, and alerts fire once per closed bar.

Recommended timeframes and instruments

AFI Stochastic Indicator is a momentum tool, so match the timeframe to your holding period.

  • M15 to H1 for intraday momentum entries.
  • H4 to Daily for swing signals and divergence.

On M1 to M5 the readings turn faster and noisier, so confirm with price structure. Also, common pairs are EURUSD, GBPUSD, AUDUSD and XAUUSD.

How to install on MT4 and MT5

AFI Stochastic Indicator - indicator inputs and settings panel
Indicator inputs and settings

Installation is the same for every indicator on this site. Also, still, unzip the download, copy the compiled .ex4 into your MT4 MQL4/Indicators folder (or the .ex5 into MT5 MQL5/Indicators), refresh the Navigator, then drag it onto the chart. For the full step-by-step with alert setup and troubleshooting, see our guide to installing MT4 and MT5 indicators.

Best practices and tips

  • Do not fade momentum in a strong trend; overbought can stay overbought.
  • Favour signals that align with the higher-timeframe direction, and watch for divergence against structure.
  • Wait for the bar to close before acting on a signal.
  • Backtest your configuration on at least 200 closed bars before trading live.
  • Keep position sizing small while you learn how the tool behaves on your instrument.
  • Review your results weekly and prune settings that underperform.

Get the AFI Stochastic for MT4 and MT5

One email unlocks the full library. This This indicator plus the other 1,382 free MT4, MT5 and TradingView indicators we publish and maintain. As a result, no paywall, no upsell, same opt-in for all of them – you give an email once and you can grab every tool we ship.

Enter your email to receive the indicator file. We send it once and add you to free updates.

No spam. Unsubscribe anytime. We never share your address.

Enter your email and the file lands in your inbox right after. The download is free.

Built by forexmt4systems.com

This The tool is one of 1,383 free MT4, MT5 and TradingView indicators we publish and maintain. Thus, every tool ships with ready-to-use compiled MT4 (.ex4) and MT5 (.ex5) files, a 4-channel alert system (popup + mobile push + email + sound), and is loaded on EURUSD H1 before release to confirm it draws cleanly without repainting. Typically, the same one-step email opt-in below unlocks the entire library – not just this one indicator.

FAQ

What does the AFI Stochastic measure?

It plots a clear signal layer that the AFI Stochastic computes from recent price and volume on the chart.

Is it non-repaint?

By default the indicator only confirms a signal on the bar close, so the printed signal locks in once that bar closes. Also, still, hence, some users prefer the early intra-bar mode for faster signals — both options are in the inputs.

Which timeframe should I use?

There is no single best timeframe. Next, m15 to H1 is a common starting point for intraday traders, and H4 to D1 works for swing traders. Backtest the configuration on the timeframe you actually trade.

Does it work on instruments other than forex?

It works on any instrument MT4 and MT5 supports — forex majors, gold (XAUUSD), indices like US30 and NAS100, and major cryptos. Then, fast-moving instruments may need a smaller period setting.

Can I add alerts?

Yes. In addition, pop-up, sound, push, and email alerts live in the inputs panel. On MT4 and MT5 the alert plays on the bar close that triggers the signal. Thus, yet, the indicator ships with full alert functionality built in: popup alerts on the chart, push notifications to mobile MetaTrader, email alerts, and a sound alert with a configurable .wav file. you toggle each channel independently from the inputs panel (EnableAlerts, EnablePopup, EnablePushNotify, EnableEmail, EnableSound). Alerts trigger once per closed bar.

For external background reading, see the technical indicator basics. Are results guaranteed?
No. Trading involves risk. Results are not guaranteed. Past performance is not indicative of future results. Use this indicator as one input. Always backtest before trading live.

Category: this is part of our Oscillators collection. Also, hence, truly, browse more Oscillators for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.

About the author

Dominic Walsh built and documented this indicator. Next, plainly, the author is Dominic Walsh, a Forex trader and MT4/MT5 indicator developer. Every tool on forexmt4systems.com goes through live-chart testing 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.

External references

Leave a Comment