[MT4指标]谁能帮我解读一下这二段EA语句。
谁能帮我解读一下这二段EA语句。
帮我翻译一下,谢谢
if(开多()&&sj!=iTime(NULL,建仓时段,0)&&(开仓方向==0||开仓方向==1))
{
Ticket=OrderSend(Symbol(),OP_BUY,下单手数,Ask,滑点,Ask-止损点数*Point,Ask+止盈点数*Point,注释,魔术号,0,Red);
if(Ticket<0)
{
Print("多单入场失败"+GetLastError());
}
if(Ticket>0)
{
PlaySound(开仓报警声音);
Print(Symbol()+"多单入场成功!!");
sj=iTime(NULL,建仓时段,0);
}
}
if(开空()&&sj!=iTime(NULL,建仓时段,0)&&(开仓方向==0||开仓方向==2))
{
Ticket=OrderSend(Symbol(),OP_SELL,下单手数,Bid,滑点,Bid+止损点数*Point,Bid-止盈点数*Point,注释,魔术号,0,Blue);
if(Ticket<0)
{
Print("空单入场失败"+GetLastError());
}
if(Ticket>0)
{
PlaySound(开仓报警声音);
Print(Symbol()+"空单入场成功!!");
sj=iTime(NULL,建仓时段,0);
}
}
if(是否启用追踪止损)移动止损();
//----
return(0);
}
//+------------------------------------------------------------------+
bool 开多()
{
double dazhu1=iMACD(NULL,建仓时段,大MACD快EMA,大MACD慢EMA,大MACDSMA,da,MODE_MAIN,1);
double dazhu2=iMACD(NULL,建仓时段,大MACD快EMA,大MACD慢EMA,大MACDSMA,da,MODE_MAIN,2);
double zhongzhu1=iMACD(NULL,建仓时段,中MACD快EMA,中MACD慢EMA,中MACDSMA,da,MODE_MAIN,1);
double zhongzhu2=iMACD(NULL,建仓时段,中MACD快EMA,中MACD慢EMA,中MACDSMA,da,MODE_MAIN,2);
double daxian=iMACD(NULL,建仓时段,大MACD快EMA,大MACD慢EMA,大MACDSMA,da,MODE_SIGNAL,1);
double xzhu1=iMACD(NULL,建仓时段,小MACD快EMA,小MACD慢EMA,小MACDSMA,xiao,MODE_MAIN,1);
double xxian1=iMACD(NULL,建仓时段,小MACD快EMA,小MACD慢EMA,小MACDSMA,xiao,MODE_SIGNAL,1);
double xzhu2=iMACD(NULL,建仓时段,小MACD快EMA,小MACD慢EMA,小MACDSMA,xiao,MODE_MAIN,2);
double xxian2=iMACD(NULL,建仓时段,小MACD快EMA,小MACD慢EMA,小MACDSMA,xiao,MODE_SIGNAL,2);
if(dazhu1>dazhu2&&zhongzhu1>zhongzhu2&&xzhu1>xxian1&&xzhu2xxian2)return(true);
else return(false);}