يمان صفريني رائد روحي
عدد الرسائل : 272 العمر : 26 السٌّمعَة : 0 نقاط : 1132 تاريخ التسجيل : 26/02/2010
| موضوع: لماذا هذا الكود لا يعمل الخميس مارس 04, 2010 4:31 am | |
| ????? ??? ?????? ?? ??????? ????????? //+------------------------------------------------------------------+ ... ????? ??? ?????? ?? ??????? ????????? //+------------------------------------------------------------------+ //| My Own Expert | //| Copyright, created 20 may 2006 | //| www.forex.com.sa | //| Desined by Dr. Waleed | //| dr_waleed@msn.com | //+------------------------------------------------------------------+
#property copyright "My Own Expert" #property link "www.forex.com.sa"
extern int MaxTrades = 1; extern int stoploss = 25; extern int takeprofit = 50; extern double TrailingStop =10; extern bool UseHourTrade = true; extern int FromHourTrade = 7; extern int ToHourTrade = 17; extern string MM_Parameters = "---------- Money Management"; extern double Lots = 1; extern bool MM = true, AccountIsMicro = false; extern int Risk = 10;
int ID=148;
//+------------------------------------------------------------------+ //| FUNCTION DEFINITIONS deinitialization function | //+------------------------------------------------------------------+
void deinit() { Comment(""); }
int orderscnt(){ int cnt=0; for(int i =0;i=FromHourTrade&&Hour()EMA8cr && EMA5pr(Point*TrailingStop)) { if((OrderStopLoss()>(Ask+Point*TrailingStop)) || (OrderStopLoss()==0)) { OrderModify(OrderTicket(),OrderOpenPrice(),Ask+Point*TrailingStop, OrderTakeProfit(),0,Red); return(0); } } }
return(0); }
//+------------------------------------------------------------------+ //| FUNCTION DEFINITIONS Money Managment | //+------------------------------------------------------------------+
double subLotSize() { double lotMM = MathCeil(AccountFreeMargin() * Risk / 1000) / 100;
if(AccountIsMicro==false) { if(lotMM < 0.1) lotMM = Lots; if((lotMM > 0.5) && (lotMM < 1)) lotMM = 0.5; if(lotMM > 1.0) lotMM = MathCeil(lotMM); if(lotMM > 100) lotMM = 100; } else { if(lotMM < 0.01) lotMM = Lots; if(lotMM > 1.0) lotMM = MathCeil(lotMM); if(lotMM > 100) lotMM = 100; }
return (lotMM);
| |
|