本文整理汇总了Java中com.ib.client.OrderState类的典型用法代码示例。如果您正苦于以下问题:Java OrderState类的具体用法?Java OrderState怎么用?Java OrderState使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
OrderState类属于com.ib.client包,在下文中一共展示了OrderState类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: NewOrderState
import com.ib.client.OrderState; //导入依赖的package包/类
public NewOrderState(OrderState orderState) {
m_status = OrderStatus.valueOf( orderState.m_status);
m_initMargin = orderState.m_initMargin;
m_maintMargin = orderState.m_maintMargin;
m_equityWithLoan = orderState.m_equityWithLoan;
m_commission = orderState.m_commission;
m_minCommission = orderState.m_minCommission;
m_maxCommission = orderState.m_maxCommission;
m_commissionCurrency = orderState.m_commissionCurrency;
m_warningText = orderState.m_warningText;
}
示例2: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
@Override public void openOrder(int orderId, Contract contract, Order orderIn, OrderState orderState) {
NewOrder order = new NewOrder( orderIn);
IOrderHandler handler = m_orderHandlers.get( orderId);
if (handler != null) {
handler.orderState( new NewOrderState( orderState) );
}
if (!order.whatIf() ) {
for (ILiveOrderHandler liveHandler : m_liveOrderHandlers) {
liveHandler.openOrder( new NewContract( contract), order, new NewOrderState( orderState) );
}
}
recEOM();
}
示例3: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
@Override public void openOrder(int orderId, Contract contract, Order order, OrderState orderState) {
IOrderHandler handler = m_orderHandlers.get( orderId);
if (handler != null) {
handler.orderState(orderState);
}
if (!order.whatIf() ) {
for (ILiveOrderHandler liveHandler : m_liveOrderHandlers) {
liveHandler.openOrder( contract, order, orderState );
}
}
recEOM();
}
示例4: displayMargin
import com.ib.client.OrderState; //导入依赖的package包/类
protected void displayMargin(OrderState orderState) {
String str = String.format( "Equity with loan: %s\n\nInitial margin: %s\nMaintenance margin: %s\n",
fmt( Double.parseDouble(orderState.equityWithLoan() ) ),
fmt( Double.parseDouble( orderState.initMargin() ) ),
fmt( Double.parseDouble(orderState.maintMargin() ) ) );
JOptionPane.showMessageDialog( this, str, "Post-Trade Margin Requirements", JOptionPane.INFORMATION_MESSAGE);
}
示例5: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
@Override public void openOrder(Contract contract, Order order, OrderState orderState) {
OrderRow full = m_map.get( order.permId() );
if (full != null) {
full.m_order = order;
full.m_state = orderState;
fireTableDataChanged();
}
else if (shouldAdd(contract, order, orderState) ) {
full = new OrderRow( contract, order, orderState);
add( full);
m_map.put( order.permId(), full);
fireTableDataChanged();
}
}
示例6: updateWebCommission
import com.ib.client.OrderState; //导入依赖的package包/类
public void updateWebCommission(int id, Order order, OrderState orderState) throws SQLException, ClassNotFoundException {
if (order == null || orderState == null) {
return;
}
if (MathUtil.isValid(orderState.m_commission)) {
executeUpdate(
"UPDATE LOW_PRIORITY IGNORE `web`.`executions` "
+ " SET commission = " + orderState.m_commission
+ " WHERE ID = " + id
+ " AND m_orderId = " + order.m_orderId
+ " ;");
}
}
示例7: OpenOrder
import com.ib.client.OrderState; //导入依赖的package包/类
public OpenOrder(
int orderId ,
Contract contract ,
Order order ,
OrderState orderState
) {
this.orderId = orderId ;
this.contract = contract ;
this.order = order ;
this.orderState = orderState;
}
示例8: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
@Override
public void openOrder(int orderId, Contract contract, Order order, OrderState orderState) {
//not implemented
}
示例9: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
@Override
public void openOrder(int orderId, Contract contract, Order order, OrderState orderState) {
ibConnectionDelegates.stream().forEach((delegate) -> {
delegate.openOrder(orderId, contract, order, orderState);
});
}
示例10: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
@Override
public void openOrder(int orderId, Contract contract, Order order, OrderState orderState) {
logger.debug("OpenOrder: " + orderId + " Contract: " + contract + " Order: " + order + " OrderState: " + orderState);
}
示例11: shouldAdd
import com.ib.client.OrderState; //导入依赖的package包/类
@Override protected boolean shouldAdd(Contract contract, Order order, OrderState orderState) {
return contract.isCombo();
}
示例12: shouldAdd
import com.ib.client.OrderState; //导入依赖的package包/类
protected boolean shouldAdd(Contract contract, Order order, OrderState orderState) {
return true;
}
示例13: OrderRow
import com.ib.client.OrderState; //导入依赖的package包/类
OrderRow( Contract contract, Order order, OrderState state) {
m_contract = contract;
m_order = order;
m_state = state;
}
示例14: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
@Override public void openOrder(int orderId, Contract contract, Order order, OrderState orderState) {
}
示例15: openOrder
import com.ib.client.OrderState; //导入依赖的package包/类
public void openOrder( int orderId, Contract contract, Order order, OrderState orderState) {
// received open order
String msg = EWrapperMsgGenerator.openOrder( orderId, contract, order, orderState);
m_TWS.add( msg) ;
}