使用 Ibrokers 账户,我知道如何使用一个代码进行交易,在下面的示例中,我使用“DAL”进行交易
library(IBrokers)
tws=twsConnect(clientId = 1,host = "localhost", port = 7497 )
contract=twsEquity(symbol = "DAL", exch = "SMART" )
order=twsOrder(action = "BUY", totalQuantity ="10", tif = "OPG" )
placeOrder(twsconn = tws, Contract = contract, Order = order)
但是我对一次交易多个代码很感兴趣,例如如何下订单购买“DAL”和“AAL”。如何在 R 中将多个订单放入 IBrokers?