ATM_TLineAudioFallingAlert_v1

Download script
Author: raff1410@o2.pl
ATM_TLineAudioFallingAlert_v1

This tool is designed to provide real-time audible notifications when the current market price interacts with a specific trend line on your trading chart. It serves as an automated "alarm system" for traders who need to monitor precise price levels without constantly staring at the screen.

How it Works

Trend Line Visualization The script automatically identifies and draws a trend line on your chart based on the historical price movement from 25 candles ago to the current price point. You can customize the appearance of this line, including its color (e.g., Red), thickness, and style (such as solid or dashed) to ensure it remains clearly visible on your workspace.

Dynamic Price Monitoring The logic focuses on the relationship between the live "Bid" price and the path of the trend line. The script constantly calculates where the current price sits in relation to that line. It specifically looks for moments when the market price enters a defined "alert zone."

The Alert Mechanism Rather than triggering a notification every time the price moves, the script uses a specific sensitivity range (measured in pips). When the live market price crosses into or touches this proximity zone around the trend line, the system triggers an immediate audio alert.

Key Features for the User

  • Audio Feedback: It plays a specific sound file to notify you of a price touch, allowing you to react quickly to potential breakouts or reversals.
  • Visual Consistency: By automatically drawing the trend line with your preferred settings, it maintains a consistent visual environment on your chart.
  • Customizable Sensitivity: The "Alert Pip Range" allows you to define exactly how close the price needs to get to the line before the alarm sounds, giving you control over how sensitive the notification is to market noise.
Miscellaneous
It plays sound alerts
10 Views
0 Downloads
0 Favorites
ATM_TLineAudioFallingAlert_v1
//+------------------------------------------------------------------+
//|                                                  HLine Alert.mq4 |
//+------------------------------------------------------------------+
#property copyright "raff1410@o2.pl"

#property indicator_chart_window
extern string TLineName="TrendLineFallingAlert";
extern color LineColor=Red; 
extern int LineStyle=STYLE_SOLID;
extern int LineWidth=2;
extern int AlertPipRange=2;
extern string AlertWav="falling-price-alert.wav";
// extern 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 Falling Price Alert","FX Currency Falling Price Alert");

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

Comments