请教MT交易公式!
以下是MT智能交易系统里自带的MACD_Sample的例子里的一段代码
// it is important to enter the market correctly,
// but it is more important to exit it correctly...
total=OrdersTotal();
for(cnt=0;cntif(OrderType()==OP_SELL && // check for opened position
OrderSymbol()==Symbol())
{
if(OrderType()==OP_BUY) // long position is opened
{......
}
}
else // go to short position
{
.........
}
以上代码中黑体的那句是什么意思,小弟始终看不明白?
即然 OrderType()==OP_SELL 说明是空单了,怎么后面又if(OrderType()==OP_BUY) // long position is opened 呢?
另外查对MT官方网站上的范例,在段码有些出入黑体的部分应该是if(OrderType()<=OP_SELL && // check for opened position, 请问这里的<=又是什么意思,难道OP_BUY是小于OP_SELL的吗,
小弟愚笨,请各位大侠指点!!











