طلب من خبراء البرمجة فى تعديل كود اكسبيرت
مساء الخير
رجاء من خبراء برمجة الاكسبرتات تعديل كود هذا الاكسبيرت واصلاح الاخطاء البرمجية الموجودة فيه لانى جديد فى مجال برمجة الاكسبيرتات وموجود صورة للاستراتيجية المصمم عليها الاكسبيرت
كود PHP:
//+------------------------------------------------------------------+
//| Forex trader V1.mq4 |
//| Copyright © 2011, MetaQuotes Software Corp. |
//| [email protected] |
//+------------------------------------------------------------------+
#property copyright "Copyright © 2011, MetaQuotes Software Corp."
#property link "[email protected]"
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
Comment("forex trade V1"+"\n"+"Desined By Engineering Poles anwer"+"\n"+"[email protected]")
//////////////////////////////////////////////////
double mgys=iCustom(NULL,0,"MGY-daysavg",0,0);
double mgyb=iCustom(NULL,0,"MGY-daysavg",1,0);
int StopLoss=50;
int TakeProfit=(mgyb-mgys)/3;
double Lots=(AccountBalance()*0.02)/50;
double SL,TP;
if (mgys=true){
if(StopLoss==0){SL=0;}else{SL=Bid+StopLoss*Point;}
if(TakeProfit==0){TP=0;}else{TP=Bid-TakeProfit*Point;}
OrderSend(NULL,OP_SELL,Lots,Bid,3,SL,TP,"eng.poles",1,0,Red);
PlaySound("Alert.wav");
}
if (mgyb=true){
if(StopLoss==0){SL=0;}else{SL=Ask-StopLoss*Point;}
if(TakeProfit==0){TP=0;}else{TP=Ask+TakeProfit*Point;}
OrderSend(NULL,OP_BUY,Lots,Ask,3,SL,TP,"eng.poles",1,0,Blue);
PlaySound("Alert.wav");
}
double LotManage
{
double lot = MathCeil(AccountFreeMargin() * 2 / 1000) / 100;
if(lot<MarketInfo(Symbol(),MODE_MINLOT))lot=MarketInfo(Symbol(),MODE_MINLOT);
if(lot>MarketInfo(Symbol(),MODE_MAXLOT))lot=MarketInfo(Symbol(),MODE_MAXLOT);
return (lot);
//----
//----
//+------------------------------------------------------------------+
ودى الاستراتيجية الى عملت عليها الاكسبيرت
http://www5.0zz0.com/2011/06/23/14/774191814.jpg
بحيث ان الاكسبيرت يفتح صفقة شراء عند وصول السعر للخط الاخضر وفتح صفقة بيع عند وصولة للخط الاحمر ويكون الهدف هو المسافة بين الخط الاخضر والاحمر مقسوما على 3 (المسافة بين الخطين/3) ويكون الاستوب لوز ثابت 50 نقطة وتكون نسبة المخاطرة 2% لكل صفقة ولا يفتح اكثر من 3 صفقات مع بعض لتكون نسبة المخاطرة الكلية 6%
الرجاء المساعدة من خبراء البرمجة