TriMAgen is a Triangular Moving Average generalized by J.Ehlers.
It has two input parameters:
- Period - calculation period
- Applied price - price used for calculations
Calculation:
TriMAgen = SUM / Len2
where:
SUM = sum of SMA(Applied price, Len1) within the Len2 range
Len1 = Floor((Period+1.0)/2)
Len2 = Ceil((Period+1.0)/2)
