File: WebAPI/rules_1.proto
Market data-based variable. The number of rules with market variables (price alerts) is limited (10 by default).
Type: string
Description: Symbol pattern to resolve into a contract and use its market data. Symbol must be specified in CQG dialect. It is allowed to specify a relative symbol (e.g., “EP”) so that the rule will switch to a new most active contract on a rollover event. If there is no need in contract switching a full contract symbol needs to be specified (e.g. metadata_2.ContractMetadata.cqg_contract_symbol). For option contracts only full symbols are allowed. The rule becomes disabled (see RuleDefinition.enabled field) when the market data on the current contract is no longer available. Multiple market variables can use the same symbol pattern but only one symbol pattern is allowed for a condition rule. It is not allowed to use contracts with non-empty ContractMetadata.contributor_parameters.parameters lists at the moment.
Required: yes.
Type: uint32
Description: Type of market variable. This field is associated with MarketVariable.Type enum.
Required: yes.
Description: Type of market variable. All price based values are provided in correct format for operations in expressions (float point value). No currency conversion is applied to these values. Some intermediate updates of market variables might be skipped from the rule’s expression evaluation, so that if the condition gets True only for a short period of time, the rule might not trigger. Expressions with variables that use last trade price or volume are evaluated starting from the first trade occurred after the rule creation.
•TYPE_LAST_TRADE_NET_CHANGE = 1
Delta between the last trade and yesterday’s settlement: last_trade - yesterday_settlement.
•TYPE_LAST_TRADE_NET_CHANGE_PC = 2
% delta between the last trade and yesterday’s settlement: 100*(last_trade - yesterday_settlement)/yesterday_settlement.
•TYPE_LAST_TRADE_PRICE = 3
Last trade price.
•TYPE_LAST_TRADE_VOLUME = 4
Last trade volume.
•TYPE_CONTRACT_TOTAL_VOLUME = 5
Today’s volume for the contract.
•TYPE_BID_ASK_SPREAD = 6
Delta between best ask and best bid: ask - bid.
•TYPE_TODAYS_HIGH = 7
Today’s high.
•TYPE_TODAYS_LOW = 8
Today’s low.