Composite Symbols

A composite symbol is defined by a mathematical expression where other symbols are used as variables (components). Only two mathematical operations are available between the components: addition and subtraction. Thus, a two-component composite symbol may look like AAA+BBB or AAA–BBB. You are free to use as many components as you like. Also, numerical coefficients are allowed; use an asterisk or a slash to add coefficients to the symbols: AAA+2*BBB–3*CCC or AAA/2+3*BBB. Brackets are allowed and have the same sense as in algebra: (AAA+BBB)/3-2*CCC.

Just like regular symbols, the composite ones have OHLCV (open, high, low, close, volume) values; however, these values are calculated based on OHLCV of the symbols used in the expression, their coefficients, and the aggregation period. The calculation is performed as follows:

  1. The system registers OHLCV values for each of the components on each of the periods defined by the aggregation.
  2. Each value is multiplied by the corresponding coefficient (if any). Note: composite volume value is an exception and is calculated by dividing the symbol's volume by the corresponding coefficient.
  3. The composite OHLCV values are derived based on the algorithm described in the table below
 

   Comp. Open

   Comp. High

   Comp. Low

   Comp. Close

   Comp.Volume

   AAA+BBB

   OpenA+OpenB

   HighA+HighB

   LowA+LowB

   CloseA+CloseB

   Min(VolA,VolB)

   AAA-BBB

   OpenA-OpenB

   HighA-LowB

   LowA-HighB

   CloseA-CloseB

   Min(VolA,VolB)

 

Note that a composite high price of the difference is equal to the first symbol’s high minus second symbol’s low; composite low is the first symbol’s low minus second symbol’s high. The composite volume of both the sum and the difference is equal to whichever volume of the two components is less.

Note also that composite symbols are not available on tick charts and the concept of aggregation is crucial for them. It’s not unlikely that daily high and low of each component are reached at different periods throughout the day. Thus, the composite OHLCV values may change dramatically as you edit the timeframe.