orderid = orderid + 1;

contract = tws.createContract();

% String This is the symbol of the underlying asset.
contract.symbol = 'GOOG';

% String This is the security type. Valid values are:
% STK, OPT, FUT, IND, FOP, CASH, BAG
contract.secType = 'STK';

% String The expiration date. Use the format YYYYMM.
contract.expiry = '';

% Double The strike price. 
contract.strike = 0;

% String Specifies a Put or Call. Valid values are: P, PUT, C, CALL.
contract.right = '';

% String Allows you to specify a future or option contract contract 
% multiplier. This is only necessary when multiple possibilities exist.
contract.multiplier = '';

% String The order destination, such as Smart.
contract.exchange = 'Smart';

% String Specifies the currency. Ambiguities may require that
% this field be specified, for example, when SMART is the
% exchange and IBM is being requested (IBM can trade in
% GBP or USD). Given the existence of this kind of
% ambiguity, it is a good idea to always specify the currency.
contract.currency = 'USD';

% String This is the local exchange symbol of the underlying asset.
contract.localSymbol = 'GOOG';

% String Identifies the listing exchange for the contract (do not list SMART).
contract.primaryExch = 'NASDAQ';

% Integer If set to true, contract details requests and historical
% data queries can be performed pertaining to expired contracts.
% Note: Historical data queries on expired contracts are
% limited to the last year of the contracts life, and are
% initially only supported for expired futures contracts,
contract.includeExpired = 0;

% String Description for combo legs
contract.comboLegsDescrip

% Object Dynamic memory structure used to store the leg definitions for this contract.
contract.comboLegs = ''; 

% Integer The unique contract identifier.
contract.conId = orderid;
