当前位置: 首页>>代码示例>>Java>>正文


Java OrderState类代码示例

本文整理汇总了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;
}
 
开发者ID:rterp,项目名称:SumZeroTrading,代码行数:12,代码来源:NewOrderState.java

示例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();
}
 
开发者ID:rterp,项目名称:SumZeroTrading,代码行数:16,代码来源:ApiController.java

示例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();
}
 
开发者ID:qerio,项目名称:goib,代码行数:14,代码来源:ApiController.java

示例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);
}
 
开发者ID:qerio,项目名称:goib,代码行数:9,代码来源:TicketDlg.java

示例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();
	}
}
 
开发者ID:qerio,项目名称:goib,代码行数:16,代码来源:OrdersPanel.java

示例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
                + " ;");
    }
}
 
开发者ID:AnyObject,项目名称:OAT,代码行数:15,代码来源:WebSchema.java

示例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;
}
 
开发者ID:softwarespartan,项目名称:TWS,代码行数:12,代码来源:OpenOrder.java

示例8: openOrder

import com.ib.client.OrderState; //导入依赖的package包/类
@Override
public void openOrder(int orderId, Contract contract, Order order, OrderState orderState) {
    //not implemented
}
 
开发者ID:rterp,项目名称:SumZeroTrading,代码行数:5,代码来源:BaseIBConnectionDelegate.java

示例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);
    });
}
 
开发者ID:rterp,项目名称:SumZeroTrading,代码行数:7,代码来源:IBConnection.java

示例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);
    
}
 
开发者ID:rterp,项目名称:SumZeroTrading,代码行数:6,代码来源:InteractiveBrokersBroker.java

示例11: shouldAdd

import com.ib.client.OrderState; //导入依赖的package包/类
@Override protected boolean shouldAdd(Contract contract, Order order, OrderState orderState) {
	return contract.isCombo();
}
 
开发者ID:qerio,项目名称:goib,代码行数:4,代码来源:ComboPanel.java

示例12: shouldAdd

import com.ib.client.OrderState; //导入依赖的package包/类
protected boolean shouldAdd(Contract contract, Order order, OrderState orderState) {
	return true;
}
 
开发者ID:qerio,项目名称:goib,代码行数:4,代码来源:OrdersPanel.java

示例13: OrderRow

import com.ib.client.OrderState; //导入依赖的package包/类
OrderRow( Contract contract, Order order, OrderState state) {
	m_contract = contract;
	m_order = order;
	m_state = state;
}
 
开发者ID:qerio,项目名称:goib,代码行数:6,代码来源:OrdersPanel.java

示例14: openOrder

import com.ib.client.OrderState; //导入依赖的package包/类
@Override public void openOrder(int orderId, Contract contract, Order order, OrderState orderState) {
}
 
开发者ID:qerio,项目名称:goib,代码行数:3,代码来源:Test.java

示例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) ;
}
 
开发者ID:qerio,项目名称:goib,代码行数:6,代码来源:SampleFrame.java


注:本文中的com.ib.client.OrderState类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。