Hey fellow traders! Today, I want to introduce you to the iWPRSignAlert, a nifty semaphore arrow signal indicator that operates on the classic Williams’ Percent Range oscillator. It’s designed to help you spot overbought and oversold conditions, and it even comes with alerts that can ping you via email or push notifications to your mobile device!
Here’s a quick rundown of the updates we've made to enhance the indicator's functionality:
- New Input Parameters:
input uint NumberofBar=1;// Bar number for the signal input bool SoundON=true; // Enable alerts input uint NumberofAlerts=2;// Number of alerts input bool EMailON=false; // Enable mailing the signal input bool PushON=false; // Enable sending the signal to mobile devices
- New Functions: We've added three new functions to the indicator code:
// Buy signal function void BuySignal(string SignalSirname, // Indicator name for alerts double &BuyArrow[], // Buffer for buy signals const int Rates_total, // Current number of bars const int Prev_calculated, // Previous bars count const double &Close[], // Close prices const int &Spread[]) { // Spread // Your logic here... }
- Integration of BuySignal() and SellSignal(): These functions are now called right after the calculation cycles in the OnCalculate() block:
BuySignal("iWPRSign", BuyBuffer, rates_total, prev_calculated, close, spread); SellSignal("iWPRSign", SellBuffer, rates_total, prev_calculated, close, spread);
Just a heads-up, make sure to set the empty values in the indicator buffers to either zeros or EMPTY_VALUE. You’ll only need one call to the BuySignal() and SellSignal() functions in the OnCalculate() block.

Fig.1. The iWPRSignAlert indicator on the chart

Fig.2. The iWPRSignAlert indicator generating alerts.
Related Posts
- Mastering the Delta_WPR Indicator for MetaTrader 5: A Trader's Guide
- Unlock Trading Insights with Volume Profile + Range v6.0 for MetaTrader 5
- Customize Your Trading Experience with WPR Custom for MetaTrader 5
- Mastering the UltraWPR Indicator for MetaTrader 5
- Mastering the Open Range Breakout Indicator for MetaTrader 5