TRIMA (Triangular Moving Average)
Indicator Description
TRIMA (Triangular Moving Average) is a weighted moving average that gives greater weight to middle prices, better reflecting the central tendency of prices.
Function Information
- Function Name:
TRIMA - Input Parameters:
#Kline: K-line data
- Parameter Settings:
timeperiod: Time period (default: 30)
- Output: Moving average value
Calculation Principle
TRIMA is calculated using the following formula:
TRIMA = Sum(Price * Weight) / Sum(Weight)
Where:
- Price is the price data
- Weight is the triangular weight, with the middle value having the highest weight and decreasing towards both ends
Usage Scenarios
- Trend identification and tracking
- Support and resistance level judgment
- Price breakout confirmation
- Trading signal generation