Unlock Trading Opportunities with the JBrainTrend1Stop_Alert Indicator for MetaTrader 5

Mike 2017.01.20 02:09 25 0 0
Attachments

JBrainTrend1Stop is an innovative trend indicator designed specifically for MetaTrader 5, equipped with handy alerts, emails, and push notifications to keep you in the loop.

Here’s a quick look at the updates made to the indicator code to enable these features:

  1. New Input Parameters Introduced:
    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
            
  2. New Functions Added: Three new functions have been integrated at the end of the indicator code:
    • BuySignal() - This function sends out buy signals.
    • SellSignal() - This function sends out sell signals.
    • GetStringTimeframe() - This function retrieves the timeframe as a string.
  3. Function Calls Added: Calls to the BuySignal() and SellSignal() functions have been included after the indicator calculation cycles in the OnCalculate() block:
    //--- 
       BuySignal("JBrainTrend1Stop_Alert", BuyStopBuffer, SellStopBuffer, rates_total, prev_calculated, close, spread);
       SellSignal("JBrainTrend1Stop_Alert", SellStopBuffer, BuyStopBuffer, rates_total, prev_calculated, close, spread);
    //---

    Here, BuyStopBuffer and SellStopBuffer are used to store signals for upward and downward trends, respectively. If there's no trend, a zero value or EMPTY_VALUE should be present in the indicator buffers.

Make sure to place the compiled JMA.mq5 indicator file in your MQL5\Indicators directory.

Fig.1. JBrainTrend1Stop_Alert indicator on the chart

Fig.1. JBrainTrend1Stop_Alert indicator on the chart

Fig.2. JBrainTrend1Stop_Alert indicator. Generating alerts

Fig.2. JBrainTrend1Stop_Alert indicator. Generating alerts

List
Comments 0