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);
}
//+------------------------------------------------------------------+
谢谢分享!!! LZ真是人才 相当不错,感谢无私分享精神! 我是个凑数的。。。 谢谢楼主,共同发展 谢谢楼主,共同发展 写的真的很不错 真是 收益 匪浅 帮你顶下哈!!
页:
[1]
2