Description
Returns 1 if the current value is strictly greater than the historical value, and 0 otherwise.
Math/Formula
$$\text{IsRising}_t = \begin{cases} 1 & \text{if } P_t > P_{t-n} \ 0 & \text{otherwise} \end{cases}$$
Implementation Details
- Generic helper function under the
helper package.
- Signature:
func IsRising[T Number](c <-chan T, period int) <-chan T
- Parameters:
period (default: 1)
- Test files with 100% coverage.
Suggested Package
helper
Description
Returns 1 if the current value is strictly greater than the historical value, and 0 otherwise.
Math/Formula
Implementation Details
helperpackage.func IsRising[T Number](c <-chan T, period int) <-chan Tperiod(default: 1)Suggested Package
helper