[MT4指标]报警线代码
但是看图像 没发觉有什么线段的报警。。。。
//+------------------------------------------------------------------+
//|                                                    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 \\n\";
   else 
   {
      Support = ObjectGetValueByShift(\"Support\", 0);
      if (Bid\\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);
}
//+------------------------------------------------------------------+
  










