コード例 #1
0
 private void checkDeltaNeutralOrderSupport() {
   if (contract.getUnderlyingCombo() != null) {
     if (!Feature.DELTA_NEUTRAL_COMBO_ORDER.isSupportedByVersion(getServerCurrentVersion())) {
       throw new RequestException(
           ClientMessageCode.UPDATE_TWS, "It does not support delta-neutral orders.", this);
     }
   }
 }
コード例 #2
0
 private void appendUnderlyingCombo(final RequestBuilder builder) {
   if (Feature.DELTA_NEUTRAL_COMBO_ORDER.isSupportedByVersion(getServerCurrentVersion())) {
     final UnderlyingCombo underComp = contract.getUnderlyingCombo();
     if (underComp != null) {
       builder.append(true);
       builder.append(underComp.getContractId());
       builder.append(underComp.getDelta());
       builder.append(underComp.getPrice());
     } else {
       builder.append(false);
     }
   }
 }