检查了一下,
没有实际进行测试,单从代码来看,可能是没有加定单类型识别所致,将两个平仓语句互换一下应该是就可以运行了,最好加上定单类型识别语句
chqyld 写道 >>
double YinLi=5;
double ZhiSun=8;
if((Bid-OrderOpenPrice())>=(YinLi*Point) || (OrderOpenPrice()-Ask)>=(Point*ZhiSun))
{
OrderClose(OrderTicket(),OrderLots(),Ask,2,Red);
}
if(OrderOpenPrice()-Ask>=YinLi*Point || Bid-OrderOpenPrice()>=Point*ZhiSun)
{
OrderClose(OrderTicket(),OrderLots(),Bid,2,Yellow);
}
请问上面这段代码能否实现在达到5点赢利与8点止损之后平仓的功能?如果可以为什么在我的EA里运行实现 不了呢?
这是很多拨头皮软件实现的技术核心,利用移动止损的原理实现MT4禁用的10点以下的止赢、止损。
我做过类似的运行的很理想。
double YinLi=5;
double ZhiSun=8;
if((Bid-OrderOpenPrice())>=(YinLi*Point) || (OrderOpenPrice()-Ask)>=(Point*ZhiSun))
{
OrderClose(OrderTicket(),OrderLots(),Ask,2,Red);
}
if(OrderOpenPrice()-Ask>=YinLi*Point || Bid-OrderOpenPrice()>=Point*ZhiSun)
{
OrderClose(OrderTicket(),OrderLots(),Bid,2,Yellow);
}
请问上面这段代码能否实现在达到5点赢利与8点止损之后平仓的功能?如果可以为什么在我的EA里运行实现 不了呢?