May
27

Case Study: Custom TRIN

This is an example on how to build a custom $TRIN using your own symbol list, Dow Jones 30 is used as the symbol list in this example.

There are four components in TRIN calculation advance issuses, decline issues, advance volume and decline volume. These four components need to be constructed individually, then combine them using either formula or user defined symbol.

Advance Issue

Advance Issue

Real-time Formula: last >= prevDclose(15M)
Historical Formula: c >= prevDclose(data1)

This formula compare current trade price to previous day close, the reason why 15 minute is used as base data series is because it will create a more efficient calculation, since higher time frame require less number of data points during calculation.

At Breadth Symbols for Data Collection add symbol list Dow Jones 30 in this case.

Now DJ_A can be used as a symbol in quote window and time charts.

Quote window

Advance Volume

Historical generation formula tab

Historical generation formula tab

Exactly the same setup as Advance issue except for calculation formula.

Real-time formula: if(last >= prevDClose(M15), vol, 0)
Historical formula: if(c >= prevDClose(data1), vol(data1), 0)

This formula return volume total instead of number of stocks that is greater than or equal to previous day close.

Decline Issues

Decline Issues

Real-time Formula: last < prevDclose(15M)
Historical Formula: c < prevDclose(data1)

Decline Volume

decline volume

Real-time formula: if(last < prevDClose(M15), vol, 0)
Historical formula: if(c < prevDClose(data1), vol(data1), 0)

Next combine all four breadth symbols to make TRIN in user defined symbol.

Custom TRIN

Custom TRIN

The resulting custom TRIN symbol can be displayed as a regular symbol in quote window and time chart.

Quote Window

Blog Developed
By ContentRobot