السلام عليكم يا شباب
بعاني مشكلة مع الكود ان الاسعم بتطهر مع كل الشموع....برحاء تقديم يد العون دا مؤشر يطهر سهم مع اول شمعه تفتح فوق الا ema المحدده
int init()
{
//---- indicators
SetIndexStyle(0, DRAW_ARROW, EMPTY);
SetIndexArrow(0, 225);
SetIndexBuffer(0, CrossUp);
SetIndexStyle(1, DRAW_ARROW, EMPTY);
SetIndexArrow(1, 226);
SetIndexBuffer(1, CrossDown);
return(0);
}
//+------------------------------------------------------------------+
//| script program start function |
//+------------------------------------------------------------------+
int start()
{
MA_ =0 ;
int counted_bars = IndicatorCounted();
int i;
int limit;
if(counted_bars < 0)
return(-1);
if(counted_bars > 0)
counted_bars--;
limit = Bars - counted_bars;
for(i=0; i<=limit; i++)
{
MA_ = iMA(Symbol(),0,MA_Period,0,MA_Type,App_Price,i);
if (Open[i] > MA_ )
{
CrossUp[i]=Low[i] - 0.0010;
}
if (Open[i] < MA_ )
{
CrossDown[i]=High[i] + 0.0010;
}
}
return(0);
}