AlertLineEn

Author: Copyright � 2010, Vladimir Hlystov
AlertLineEn
Miscellaneous
It issuies visual alerts to the screen
0 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

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---