CTI: Ehler's Correlation Trend Indicator

View source: R/CTI.R

CTIR Documentation

Ehler's Correlation Trend Indicator

Description

Ehler's Correlation Trend Indicator (CTI) measures the Spearman correlation of the price with the ideal trend line: a straight line with increasing slope.

Usage

CTI(price, n = 20, slope = 1)

Arguments

price

Price series that is coercible to xts or matrix.

n

Number of periods to use.

slope

Slope of desired trend.

Details

The CTI measures the Spearman correlation between the price and the ideal trend line with slope of slope, over the past n days.

See URL in references section for further details.

Value

A object of the same class as price or a matrix (if try.xts fails) with the column:

cti

The Correlation Trend Indicator.

Note

Positive/negative CTI values signal positive/negative correlation with the desired trend line slope. A simple strategy could be long when the CTI is positive and, short when it is negative.

Author(s)

Ethan Smith, Joshua Ulrich

References

John Ehlers, Correlation Trend Indicator, Stocks & Commodities May-2020 The following site(s) were used to code/document this indicator:
https://financial-hacker.com/petra-on-programming-a-unique-trend-indicator/

See Also

See aroon, CCI, ADX, VHF, GMMA, TDI for other indicators that measure trend direction/strength.

Examples


data(ttrc)
cti <- CTI(ttrc[,"Close"], n = 20)


TTR documentation built on May 29, 2024, 3:54 a.m.

Related to CTI in TTR...