Creating QFormulas

 

Description

QFormulas enable you to define specific market spreads, such as crack or crush, or custom indices.

Situational examples

Weighting spreads between markets to normalize different contract specifications (for example, heating oil is quoted in gallons while crude oil is quoted in barrels).

Monitoring the basis between the cash and futures or two futures contracts of different months.

Monitoring and charting the daily equity gain or loss in a distinct portfolio.

Tracking custom securities indices.

Formula components

QFormulas can contain multiple symbols, constants, or coefficients as well as specific conditions, bar values, study values, user values, and function values.

Formula example

SPREAD(DB-3.25*DL+4*DG, , , 4:13:16)

Calculates the spread between the Bund, BOBL, and Schatz.

Location

Formula Builder, QFormulas window

Used with

Use these anywhere you’d use a symbol.

QFormulas can be used in quote and chart windows by entering the QNumber in the entry field.

You can assign a set of trading parameters to a particular QFormula on the Risk, Limits & Stops, and Iceberg Strategies trading preference windows. Follow the same steps you would for assigning values to a specific symbol, but select the QFormula instead.

Pre-defined formulas

CQG provides dozens of pre-set QFormulas.