Skip to content
All library documents

Adding Sound, Email, and Push Alerts to a Stochastic Signal Indicator

Article MQL5 code base

Summary

This document explains how to add notifications to an indicator that marks signals when the classic Stochastic oscillator exits overbought or oversold territory. It describes configurable inputs for the bar used to read a signal, sound alerts, the alert count, email, and mobile push messages. Buy and sell routines inspect the relevant arrow buffer, select the requested bar index based on whether arrays are series-oriented, and assemble a message with symbol, timeframe, timestamp, and price information.

The routines are intended to be called after indicator calculations in the platform’s calculation handler, using the indicator’s buy and sell buffers. A counter resets when the total bar count changes, limiting repeated messages within the same calculation cycle. The document is implementation guidance for alert delivery, not a strategy evaluation: it provides no trading results or evidence that Stochastic exit signals are profitable. Correct integration depends on the buffer names, array orientation, and empty-value convention used by the underlying indicator.

Key ideas

  • The underlying indicator signals when Stochastic exits overbought or oversold territory.
  • Inputs control the signal bar, sound, alert count, email, and mobile notifications.
  • Separate buy and sell routines read signal buffers and construct alert messages.
  • Call the routines after indicator calculations and provide the correct buffers.
  • The material explains notification plumbing and does not test trading performance.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.