
15-02-2014, 05:03 PM
|
|
رد: موضوع مخصص للاسئلة والاستفسارات الخاصة بدورة تعليم البرمجة الاحترافية بلغة mql4
انا بقالى مده مش عارف الغلط ف الكود ده فين ..
 |
|
 |
|
//+------------------------------------------------------------------+
//| OrderBuyAndSell.mq4 |
//| ahmed saleh |
//| http://www.facebook.com/ahmed.saleh7787 |
//+------------------------------------------------------------------+
#property copyright "ahmed saleh"
#property link "www.facebook.com/ahmed.saleh7787"
extern double lot = 0.01;
extern double takeprofit = 10;
extern int magic=7777;
int t ;
int init()
{
double ticksize=MarketInfo(Symbol(),MODE_TICKSIZE);
if (ticksize==0.00001||0.001)
t=ticksize*10;
else t=ticksize;
// if(Digits==5||Digits==3){t=10;}
// if(Digits==5){t=10;}
// if(Digits==3){t=0.1;}
return(0);
}
int deinit()
{
return(0);
}
int start()
{
//----
if(OrdersTotal()==0)
{
OrderSend(Symbol(),OP_BUY,lot,Ask,5,0,takeprofit*t ,NULL,magic,0,Green);
}
//----
return(0);
}
//+------------------------------------------------------------------+ |
|
 |
|
 |
|