AlertLineEn

Download script
Author: Copyright � 2010, Vladimir Hlystov
AlertLineEn

This script serves as a real-time monitoring tool designed to track the relationship between current market prices and two specific manual boundaries on your trading chart: Support and Resistance.

How it Works

The tool continuously scans your active chart to identify two specific objects you have drawn—one named "Support" and one named "Rezistans." It then performs a constant comparison between the live market price and these levels.

Key Functionalities

  • Breakout Notifications: The script acts as an automated lookout. If the market price drops below your designated Support line or climbs above your Resistance line, the tool will trigger an immediate audible and visual alert. This is designed to notify you the moment a significant price barrier has been breached.

  • Dynamic Distance Tracking: When the price remains within your defined boundaries (i.e., it hasn't broken through them yet), the tool calculates exactly how far the current price is from these lines. It converts this distance into "Points" (the smallest unit of price movement), allowing you to see how much room remains before a potential breakout occurs.

  • On-Screen Status Summary: The script provides a live text summary directly on your trading screen. This display updates automatically to show you:

    • Whether the specific lines have been successfully placed on the chart.
    • A real-time reading of the distance to either the Support or Resistance level.
    • A clear notification if a breakout has occurred.

Summary for Traders

Essentially, this script eliminates the need to manually squint at price levels. It automates the "watching" process by providing constant distance measurements and shouting a warning the moment your price targets are crossed, helping you react more quickly to market movements.

Miscellaneous
It issuies visual alerts to the screen
8 Views
0 Downloads
0 Favorites
AlertLineEn
//+------------------------------------------------------------------+
//|                                                    AlertLine.mq4 |
//|                               Copyright © 2010, Vladimir Hlystov |
//|                                         http://cmillion.narod.ru |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2010, Vladimir Hlystov"
#property link      "http://cmillion.narod.ru"
#property indicator_chart_window
//+------------------------------------------------------------------+
int start()
{
   double Support,Rezistans;
   string txt;
   if (ObjectFind("Support")==-1) txt="No line <Support>\n";
   else 
   {
      Support = ObjectGetValueByShift("Support", 0);
      if (Bid<Support) 
      {
         Alert("Price below the support line ");
         txt=StringConcatenate(txt,"Price below the support line \n");
      }
      else txt=StringConcatenate(txt,"Distance to the line of support ",DoubleToStr((Bid-Support)/Point,0),"\n");
   }
   if (ObjectFind("Rezistans")==-1) txt=StringConcatenate(txt,"No line <Rezistans>\n");
   else 
   {
      Rezistans = ObjectGetValueByShift("Rezistans", 0);
      if (Ask>Rezistans) 
      {
         Alert("Price above the resistance line");
         txt=StringConcatenate(txt,"Price above the resistance line");
      }
      else txt=StringConcatenate(txt,"Distance to the line of support ",DoubleToStr((Rezistans-Ask)/Point,0));
   }
   Comment(txt);
   return(0);
}
//+------------------------------------------------------------------+

Comments