ATM_TLineAudioRisingAlert_v1

Download script
Author: raff1410@o2.pl
ATM_TLineAudioRisingAlert_v1

This tool is designed as an automated visual and audible notification system for MetaTrader users who need to monitor specific price movements in real-time. It functions by creating a dynamic trendline on your trading chart and alerting you the moment the current market price interacts with that line.

Core Functionality

Visual Trendline Placement The script automatically identifies and draws a specific trendline on your chart. It calculates the trajectory of this line based on historical price data (specifically looking back at previous price points) to project where the price is headed. You can customize how this line appears, including its color, thickness, and style (such as solid or dashed), ensuring it remains clearly visible against your other chart elements.

Proximity Detection Logic Rather than just alerting you when the price hits an exact mathematical point—which can sometimes be missed due to the rapid "jumping" of live quotes—the script uses a "proximity zone." You can define a specific range (measured in pips) around the trendline. If the current market price enters this predefined buffer zone, the system triggers its alert mechanism.

Multi-Channel Notifications To ensure you never miss a key price interaction, the script offers two primary ways to notify you:

  • Audio Alerts: The tool can play a specific sound file directly through your trading platform as soon as the price enters the alert zone.
  • Email Alerts: For traders who are away from their desks, the script includes an optional feature to send an automated email notification, providing an instant update on the market movement.

Summary of Use

Essentially, this tool acts as a "digital lookout." It draws a boundary line based on your trading setup and watches the live market 24/7. When the price touches or enters the area near that line, it proactively grabs your attention through sound or email, allowing for faster decision-making without the need to constantly watch the screen.

Miscellaneous
It plays sound alertsIt sends emails
12 Views
0 Downloads
0 Favorites
ATM_TLineAudioRisingAlert_v1
//+------------------------------------------------------------------+
//|                                                  HLine Alert.mq4 |
//+------------------------------------------------------------------+
#property copyright "raff1410@o2.pl"

#property indicator_chart_window
extern string TLineName="TrendLineRisingAlert";
extern color LineColor=Blue; 
extern int LineStyle=STYLE_SOLID;
extern int LineWidth=2;
extern int AlertPipRange=2;
extern string AlertWav="rising-price-alert.wav";
bool EmailON=false;


//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int init()
  {
//---- indicators
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function                       |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int start()
  {
   int    counted_bars=IndicatorCounted();
      ObjectCreate(TLineName, OBJ_TREND, 0, Time[25], Bid, Time[0], Ask);
      ObjectSet(TLineName, OBJPROP_STYLE, LineStyle);
      ObjectSet(TLineName, OBJPROP_COLOR, LineColor);
      ObjectSet(TLineName, OBJPROP_WIDTH, LineWidth);

      double val=ObjectGetValueByShift(TLineName, 0);
      if (Bid-AlertPipRange*Point <= val && Bid+AlertPipRange*Point >= val) PlaySound(AlertWav);

      if (EmailON) SendMail("FX Currency Rising Price Alert","FX Currency Rising Price Alert");

//----
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments