الاخ وضاح الاخوة المبرمجين طلب مساعدة في مؤشر
هذا المؤشر وجدته على النت وهو متعلق بموضوع للاستاذ سمير صيام ( دايفرجنس الشموع )
ارجو اضافة سهم للمؤشر عند حدوث الشروط ليسهل عمل باك تيست حيث ان المؤشر يقوم باعطاء تنبيه صوتي فقط مع التحية
كود:
/+------------------------------------------------------------------+
//| Divergent Bar.mq4 |
//| Copyright © 2007, Jan Klimo |
//| [email protected] |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2007, Jan Klimo"
#property link "[email protected]"
#property indicator_chart_window
bool bullish, bearish;
int BarsCount = 0;
int init()
{
return(0);
}
int deinit()
{
return(0);
}
int start()
{
bullish = false;
bearish = false;
if (Bars > BarsCount)
{
//bullish bar
if ( (Low[1] < Low[2]) && (Close[1] > (High[1] + Low[1])/2) ) bullish = true;
//bearish bar
if ( (High[1] > High[2]) && (Close[1] < (High[1] + Low[1])/2) ) bearish = true;
//alerts
if (bullish) Alert("Bullish divergent bar on ", Symbol(), " ", Period());
if (bearish) Alert("Bearish divergent bar on ", Symbol(), " ", Period());
BarsCount = Bars;
}
return(0);
}
//+---------------------------------------
رد: الاخ وضاح الاخوة المبرمجين طلب مساعدة في مؤشر