k大您好
又來叨擾您了
我發現在這段
藍色字是我的code
紅色字是您的code
用我的會出錯
但用您的取代就能成功下單
if ( BuyTrigger AND BuyOrderID == "" )
{
ibc.CloseAllOpenPositions( ContractMonth );
//BuyOrderID = ibc.PlaceOrder( ContractMonth, "BUY", Shares, "LMT", BuyPrice, 0, "DAY", True );
BuyOrderID = ibc.PlaceOrder(ContractMonth, "BUY", Shares, "MKT", 0, 0, "DAY", True);
StaticVarSetText( "BuyOrderID" + Name(), BuyOrderID, true );
}
else if ( SellTrigger AND SellOrderID == "" )
{
ibc.CloseAllOpenPositions( ContractMonth );
//SellOrderID = ibc.PlaceOrder( ContractMonth, "SELL", Shares, "LMT", ShortPrice, 0, "DAY", True );
SellORderID = ibc.PlaceOrder(ContractMonth, "SELL", Shares, "MKT", 0, 0, "DAY", True);
StaticVarSetText( "SellOrderID" + Name(), SellOrderID, true );
}
-----
剛下出去時
有出現個畫面
想跟您詢問一下
感謝指導
|