Trend Analysis: Mathematical Trend Identification
I. Definition of Trend
A trend represents the general direction of price movement over time. Identifying trends is fundamental to profitable trading as it allows traders to align with market momentum.
II. Formal Trend Definitions
Definition 2.1 (Uptrend - Dow Theory)
An uptrend exists when:
Higher highs AND higher lows.
Definition 2.2 (Downtrend - Dow Theory)
A downtrend exists when:
Lower highs AND lower lows.
Definition 2.3 (Sideways/Range)
Price contained within horizontal bounds.
III. Trend Measurement Methods
3.1 Linear Regression
Trend Line:
Where:
Interpretation:
- β₁ > 0 → Uptrend
- β₁ < 0 → Downtrend
- β₁ ≈ 0 → Sideways
3.2 Moving Average Slope
Trend Direction:
3.3 Higher Timeframe Confirmation
Where TF ∈ {1H, 4H, Daily, Weekly}.
IV. Average Directional Index (ADX)
Definition 4.1 (Directional Movement)
Definition 4.2 (Directional Indicators)
Definition 4.3 (ADX)
Interpretation
| ADX Value | Trend Strength | |-----------|----------------| | 0-20 | Weak/No trend | | 20-40 | Moderate trend | | 40-60 | Strong trend | | 60-100 | Very strong trend |
V. Trend Line Construction
5.1 Uptrend Line
Connect two or more swing lows:
5.2 Downtrend Line
Connect two or more swing highs:
5.3 Validity Criteria
- Minimum 2 touches (3+ preferred)
- Angle between 20° and 60°
- No penetrations (or brief penetrations only)
VI. Trend Channels
Definition 6.1 (Trend Channel)
Parallel lines containing price action:
Where k is the average distance to the primary trend line.
6.2 Channel Trading
- Buy at lower channel boundary in uptrend
- Sell at upper channel boundary in downtrend
- Breakout signals potential trend acceleration
VII. Mathematical Trend Filters
7.1 Price vs Moving Average
7.2 Moving Average Cross
7.3 Donchian Channel
Breakout above Upper → Uptrend initiation Breakout below Lower → Downtrend initiation
VIII. Trend Reversals
8.1 Reversal Signals
- Break of trend line
- Lower high in uptrend / Higher low in downtrend
- Moving average cross
- Divergence on momentum indicators
8.2 Trend Exhaustion Model
IX. Exercises
Exercise 1: Calculate the slope of linear regression for prices [100, 102, 101, 104, 106].
Exercise 2: Given +DI=25, -DI=15, calculate DX.
Exercise 3: Draw trend lines for swing lows at (1, 100), (5, 102), (10, 105).
Exercise 4: Prove that in a perfect uptrend with constant slope, ADX approaches 100.
X. References
- Edwards, R.D. & Magee, J. (1948). Technical Analysis of Stock Trends
- Wilder, J.W. (1978). New Concepts in Technical Trading Systems
- Murphy, J.J. (1999). Technical Analysis of the Financial Markets