void OnTick()
{
//----------------------开始编写策略核心-----------------------------+
iShowInfo();
BuyMain();
SellMain();
if (BuyGroupOrders==0 && BuyLimitOrders==0 && SellLimitOrders==0 && BuyStopOrders==0 && SellStopOrders==0)
{
iWait();
iDisplayInfo("TradeInfo", "市价买入开仓", 1, 5, 50, FontSize, "", Olive);
OrderSend(Symbol(),OP_BUY,Lots,Ask,0,0,0,MyOrderComment+DoubleToStr(Ask,Digits),MyMagicNum);
OrderSend(Symbol(),OP_SELL,Lots,Bid,0,0,0,MyOrderComment+DoubleToStr(Bid,Digits),MyMagicNum);
}
return(0);
//----------------------编写策略核心结束-----------------------------+
}
上面的自定义函数也都没有啥问题的,可以执行的时候为啥不能开卖单呢? |