ده اول اكسبريت ليا بس مش عارف تقريبا في حاجة فيه غلط
[PHP]//+------------------------------------------------------------------+
//| MA.mq4 |
//| MFB |
//| |
//+------------------------------------------------------------------+
#property copyright "MFB"
#property link ""
//--- input parameters
extern double volume;
extern int take_profit;
extern int stop_loss;
//+------------------------------------------------------------------+
//| expert initialization function |
//+------------------------------------------------------------------+
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
Comment("Programmed by Eng.Mahmoud");
/////////////////////////////////////
double SL,TP;
////////////////////////////////////
color arrow_color;
double SMA1=iMA(NULL,0,50,0,1,1,1);
double SMA2=iMA(NULL,0,50,0,1,1,1);
double FMA1=iMA(NULL,0,14,0,1,1,1);
double FMA2=iMA(NULL,0,14,0,1,1,1);
if (FMA2<SMA2&&FMA1>SMA1){
if (stop_loss==0){SL=Ask;}else{SL=Ask-stop_loss*volume;}
if (take_profit==0){TP=Ask;}else{TP=Ask+take_profit*v olume;}
OrderSend(Symbol(),0,volume,Ask,3,SL,TP,"Eng.Mahmo ud",0,0);
PlaySound("Alert.wav");
}
if (FMA2>SMA2&&FMA1<SMA1){
if (stop_loss==0){SL=Ask;}else{SL=Ask-stop_loss*volume;}
if (take_profit==0){TP=Ask;}else{TP=Ask+take_profit*v olume;}
OrderSend(Symbol(),1,volume,Ask,3,SL,TP,"Eng.Mahmo ud",0,0);
PlaySound("alert.wav");
}
//----
//----
return(0);
}
//+------------------------------------------------------------------+[/PHP]