老王吧 发表于 2016-5-19 15:57:38

Alert Line



//+------------------------------------------------------------------+
//|                                                    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);
}
//+------------------------------------------------------------------+




xiaoketao 发表于 2018-6-6 01:40:56

谢谢分享!!!

istzq 发表于 2020-2-3 16:26:47

LZ真是人才

chameiwang 发表于 2020-5-10 12:30:39

相当不错,感谢无私分享精神!

xrupluoa 发表于 2020-5-17 11:50:31

我是个凑数的。。。

aLtoqb 发表于 2020-5-30 16:37:06

谢谢楼主,共同发展

u5z69b58 发表于 2020-6-15 11:07:37

谢谢楼主,共同发展

言笑言言 发表于 2020-6-16 11:48:41

写的真的很不错

笨笨熊qo 发表于 2020-6-27 17:48:59

真是 收益 匪浅

汇晟 发表于 2020-7-12 12:29:53

帮你顶下哈!!
页: [1] 2
查看完整版本: Alert Line