Indicator Description
CDP (Contrarian Daily Price) is a trend indicator that reflects the strength and direction of market trends by calculating price trend changes.
Function Information
- Function Name: CDP
- Input Parameters: High, Low, Close
- Parameter Settings: timeperiod (default: 20)
- Output: cdp, ah, al, nh, nl
Calculation Principle
CDP is calculated using the following formula:
CDP = (High + Low + Close) / 3
AH = CDP + (High - Low)
AL = CDP - (High - Low)
NH = CDP * 2 - Low
NL = CDP * 2 - HighWhere AH/AL are above resistance levels and NH/NL are near resistance/support levels.
Usage Scenarios
- Trend direction judgment
- Trend strength analysis
- Trend reversal identification
- Trading signal generation