عرض مشاركة واحدة
قديم 29-01-2013, 12:15 AM   المشاركة رقم: 181
الكاتب
MOVING_AVERAGE
عضو فضى
الصورة الرمزية MOVING_AVERAGE

البيانات
تاريخ التسجيل: Feb 2012
رقم العضوية: 8190
الدولة: algeria
العمر: 42
المشاركات: 2,213
بمعدل : 0.46 يوميا

الإتصالات
الحالة:
MOVING_AVERAGE غير متواجد حالياً
وسائل الإتصال:

كاتب الموضوع : MOVING_AVERAGE المنتدى : منتدى المؤشرات و الاكسبيرتات
افتراضي رد: دورة تعلم البرمجة باحتراف

حل التمرين السابق


الطريقة 1

[PHP]
int start()
{
int x,i;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
x=Bars-counted_bars;

for(i =0 ; i<x ; i++)
{

//من اجل الشمعة 0
double open0=Open[i];
double close0=Close[i];
double high0=High[i];
double low0=Low[i];

//من اجل الشمعة 1
double open1=Open[i+1];
double close1=Close[i+1];
double high1=High[i+1];
double low1=Low[i+1];



}

return(0);
}

[/PHP]

الطريقة 2

[PHP]
int start()
{
int x,i;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
x=Bars-counted_bars;

for(i =0 ; i<x ; i++)
{

//من اجل الشمعة 0
double open0=iOpen(0,0,i);
double close0=iClose(0,0,i);
double high0=iHigh(0,0,i);
double low0=iLow(0,0,i);

//من اجل الشمعة 1
double open1=iOpen(0,0,i+1);
double close1=iClose(0,0,i+1);
double high1=iHigh(0,0,i+1);
double low1=iLow(0,0,i+1);



}

return(0);
}
[/PHP]



التوقيع

نقره لعرض الصورة في صفحة مستقلة







عرض البوم صور MOVING_AVERAGE  
رد مع اقتباس
  #181  
قديم 29-01-2013, 12:15 AM
MOVING_AVERAGE MOVING_AVERAGE غير متواجد حالياً
عضو فضى
افتراضي رد: دورة تعلم البرمجة باحتراف

حل التمرين السابق


الطريقة 1

[PHP]
int start()
{
int x,i;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
x=Bars-counted_bars;

for(i =0 ; i<x ; i++)
{

//من اجل الشمعة 0
double open0=Open[i];
double close0=Close[i];
double high0=High[i];
double low0=Low[i];

//من اجل الشمعة 1
double open1=Open[i+1];
double close1=Close[i+1];
double high1=High[i+1];
double low1=Low[i+1];



}

return(0);
}

[/PHP]

الطريقة 2

[PHP]
int start()
{
int x,i;
int counted_bars=IndicatorCounted();
if(counted_bars<0) return(-1);
if(counted_bars>0) counted_bars--;
x=Bars-counted_bars;

for(i =0 ; i<x ; i++)
{

//من اجل الشمعة 0
double open0=iOpen(0,0,i);
double close0=iClose(0,0,i);
double high0=iHigh(0,0,i);
double low0=iLow(0,0,i);

//من اجل الشمعة 1
double open1=iOpen(0,0,i+1);
double close1=iClose(0,0,i+1);
double high1=iHigh(0,0,i+1);
double low1=iLow(0,0,i+1);



}

return(0);
}
[/PHP]




رد مع اقتباس