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