diff options
| author | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
|---|---|---|
| committer | Ethan Werner <mail@ethanwerner.com> | 2026-08-09 15:02:21 +0400 |
| commit | 3d92926a902017e7cf1f5738e99ff62da596ce12 (patch) | |
| tree | 2b55422c26a48759d56fa91f06df24449e9dfa88 /lib/stoch_rsi.c | |
| parent | 07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff) | |
Diffstat (limited to 'lib/stoch_rsi.c')
| -rw-r--r-- | lib/stoch_rsi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/stoch_rsi.c b/lib/stoch_rsi.c index 81992a6..97427be 100644 --- a/lib/stoch_rsi.c +++ b/lib/stoch_rsi.c @@ -25,7 +25,7 @@ ts_parameter_t const ts_stoch_rsi_p = { .n_inputs = 1, .n_outputs = 2, .n_consta uint_t ts_stoch_rsi_offset( ts_constant_t const *c ) { ( void )c; - return ( c ? ((ts_stoch_rsi_params_t *)c)->rsi_period + ((ts_stoch_rsi_params_t *)c)->stoch_period - 1 : 0 ); + return ( c ? ((ts_stoch_rsi_params_t const *)c)->rsi_period + ((ts_stoch_rsi_params_t const *)c)->stoch_period - 1 : 0 ); } int ts_stoch_rsi( @@ -36,8 +36,8 @@ int ts_stoch_rsi( { TS_PROLOGUE( ts_stoch_rsi_p ); if ( !c ) return -1; - uint_t rsi_period = ((ts_stoch_rsi_params_t *)c)->rsi_period; - uint_t stoch_period = ((ts_stoch_rsi_params_t *)c)->stoch_period; + uint_t rsi_period = ((ts_stoch_rsi_params_t const *)c)->rsi_period; + uint_t stoch_period = ((ts_stoch_rsi_params_t const *)c)->stoch_period; if (rsi_period == 0 || stoch_period == 0) return -1; fp_t *rsi_values = NULL; |