Original (English)Variables for futures and optionsThe following variables are valid after loading a contract chain and selecting a contract. ContractTypeContractExpiryType and expiration date (YYYYMMDD format) of the selected contract, or 0 when no valid contract was selected. Type:int, read/only ContractAskContractBidContractUnlContractStrikeContractVolContractValCurrent ask, bid, underlying, and strike price, and trade volume or open interest of the selected contract. 0 when no contract chain was loaded, or no valid contract was selected, or when the parameter is not or not yet available in the selected contract. In historical data, ContractAsk or ContractBid can be 0 with illiquid or worthless contracts; such contracts should not be traded. ContractVal includes the multiplier retrieved from the broker API in [Trade] mode. For retrieving the ask and bid prices, the underlying, and the volume in [Trade] mode, contractPrice must be called before. Type:var, read/only ThisContractThe currently selected contract by the last contract call. In [Trade] mode, (string)ThisContract - the first element of the CONTRACT struct - contains the trading class retrieved from the broker API. ContractsThe current option or future chain loaded by the last contractUpdate call. A list of CONTRACT structs of the size NumContracts, sorted first by ascending expiration, second by ascending strike. Can be used for enumerating all contracts. Type:CONTRACT* NumContractsThe number of contracts in the chain, up to 20000, or 0 when no chain was loaded. ContractRowThe row number of the selected contract in the historical .t8 dataset that holds the contract chain history of the current asset in Test and Train mode; the row number of the selected contract in the options chain (Contracts pointer) in Trade mode. Can be used to retrieve further data belonging to the contract from additional datasets. ContractHandleThe handle of the historical .t8 dataset that holds the contract chain history of the current asset in Test and Train mode. Can be set to a specific dataset before calling contractUpdate; otherwise it is automatically set. Type:int, asset specific.
The following variables are used to set up asset specific contract parameters: MultiplierNumber of underlying units per option / future contract, for calculating the trade volume, selecting a contract, and filtering the options chain (default 0 = download all options). Asset specific; set it after selecting the asset and before buying contracts. If at 0, contractUpdate will in [Trade] mode automatically set this variable to the multiplier of the first contract if available via broker API. CentageCombination of flags that determine which option or futures prices in historical data or live data are given in cents instead of dollars (default 0 = all prices in dollars). Prices are then automatically converted to dollars when loading history or retrieving data from the broker API. Centage flags can be combined by adding them up. Asset specific; to be set after selecting the asset and before buying contracts. Example: Centage = 59 (= 32+16+8+2+1) for ask/bid always in cents, underlying history in cents but live in dollars, and strike always in cents. Type:int, asset specific ExpiryTimeThe hour in HHMM format at which contracts expire; default 1200 (UTC). Used for contractDays. Added to the TradeExitDate variable when a trade is opened. At that time on its expiration day, the trade will be removed from the open trade list, and its profit or loss will be booked to the account. Set this to a higher value for checking contract expiration with the contractCheck function in live trading. Note that some exchanges have restrictions to trading or exercising contracts at their expiration day. Type:int, global for all assets ExchangeThe exchange for the contracts in live trading. Set the exchange symbol manually through this variable when the exchange is required by the broker. The list of valid exchange symbols can be obtained from the broker website. Type:string, asset specific. Remarks:
Examples: see Options and FuturesSee also:enterLong/Short, Contract, Combo► latest version online |
Übersetzung (Deutsch)Variablen für Futures und OptionenDie folgenden Variablen sind gültig, nachdem eine Vertragskette geladen und ein Vertrag ausgewählt wurde. ContractTypeContractExpiryTyp und Verfallsdatum (Format JJJJMMTT) des ausgewählten Vertrags oder 0, wenn kein gültiger Vertrag ausgewählt wurde. Typ:int, nur lesbar ContractAskContractBidContractUnlContractStrikeContractVolContractValAktueller Ask-, Bid-, Underlying- und Strike-Preis sowie Handelsvolumen oder Open Interest des ausgewählten Vertrags. 0, wenn keine Vertragskette geladen wurde, kein gültiger Vertrag ausgewählt wurde oder der Parameter nicht oder noch nicht im ausgewählten Vertrag verfügbar ist. In historischen Daten können ContractAsk oder ContractBid bei illiquiden oder wertlosen Verträgen 0 sein; solche Verträge sollten nicht gehandelt werden. ContractVal umfasst den Multiplikator, der über die Broker-API im [Trade]-Modus abgerufen wird. Um die Ask- und Bid-Preise, das Underlying und das Volumen im [Trade]-Modus abzurufen, muss vorher contractPrice aufgerufen werden. Typ:var, nur lesbar ThisContractDer aktuell ausgewählte Vertrag durch den letzten contract-Aufruf. Im [Trade]-Modus, (string)ThisContract - das erste Element der CONTRACT-Struktur - enthält die Handelsklasse, die über die Broker-API abgerufen wurde. ContractsDie aktuelle Options- oder Future-Kette, die durch den letzten contractUpdate-Aufruf geladen wurde. Eine Liste von CONTRACT-Strukturen der Größe NumContracts, sortiert zuerst nach aufsteigendem Verfallsdatum, dann nach aufsteigendem Strike. Kann verwendet werden, um alle Verträge aufzulisten. Typ:CONTRACT* NumContractsDie Anzahl der Verträge in der Kette, bis zu 20000, oder 0, wenn keine Kette geladen wurde. ContractRowDie Zeilennummer des ausgewählten Vertrags im historischen .t8 Datensatz, der die Vertragskettengeschichte des aktuellen Assets im Test- und Trainingsmodus enthält; die Zeilennummer des ausgewählten Vertrags in der Optionskette (Contracts-Pointer) im Handelsmodus. Kann verwendet werden, um weitere Daten, die zum Vertrag gehören, aus zusätzlichen Datensätzen abzurufen. ContractHandleDer Handle des historischen .t8 Datensatzes, der die Vertragskettengeschichte des aktuellen Assets im Test- und Trainingsmodus enthält. Kann vor dem Aufruf von contractUpdate auf einen spezifischen Datensatz gesetzt werden; andernfalls wird er automatisch gesetzt. Typ:int, asset-spezifisch.
Die folgenden Variablen werden verwendet, um asset-spezifische Vertragsparameter einzurichten: MultiplierAnzahl der Underlying-Einheiten pro Options- / Future-Vertrag, zur Berechnung des Handelsvolumens, zur Auswahl eines Vertrags und zum Filtern der Optionskette (Standard 0 = alle Optionen herunterladen). Asset-spezifisch; nach der Auswahl des Assets und vor dem Kauf von Verträgen einstellen. Wenn auf 0 gesetzt, wird contractUpdate im [Trade]-Modus diese Variable automatisch auf den Multiplikator des ersten Vertrags setzen, sofern über die Broker-API verfügbar. CentageKombination von Flags, die bestimmen, welche Options- oder Future-Preise in historischen Daten oder Live-Daten in Cent statt in Dollar angegeben werden (Standard 0 = alle Preise in Dollar). Preise werden dann beim Laden der Historie oder beim Abrufen von Daten von der Broker-API automatisch in Dollar umgerechnet. Centage-Flags können durch Addition kombiniert werden. Asset-spezifisch; nach der Auswahl des Assets und vor dem Kauf von Verträgen einstellen. Beispiel: Centage = 59 (= 32+16+8+2+1) für Ask/Bid immer in Cent, Underlying-Historie in Cent aber Live in Dollar, und Strike immer in Cent. Typ:int, asset-spezifisch ExpiryTimeDie Stunde im HHMM-Format, zu der Verträge verfallen; Standard 1200 (UTC). Wird für contractDays verwendet. Wird zur TradeExitDate-Variable hinzugefügt, wenn ein Trade eröffnet wird. Zu diesem Zeitpunkt am Verfallsdatum des Vertrags wird der Trade aus der offenen Trade-Liste entfernt und sein Gewinn oder Verlust dem Konto gutgeschrieben. Setze dies auf einen höheren Wert, um die Vertragsverfall mit der contractCheck-Funktion im Live-Handel zu überprüfen. Beachte, dass einige Börsen Beschränkungen für den Handel oder die Ausübung von Verträgen am Verfallsdatum haben. Typ:int, global für alle Assets ExchangeDie Börse für die Verträge im Live-Handel. Setze das Börsensymbol manuell über diese Variable, wenn die Börse vom Broker verlangt wird. Die Liste gültiger Börsensymbole kann von der Broker-Website bezogen werden. Typ:string, asset specific. Bemerkungen:
Beispiele: siehe Optionen und FuturesSee also:enterLong/Short, Vertrag, Combo► neueste Version online |