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/stochastic_momentum_index.c | |
| parent | 07e18043145f3d91c8ea7ec3ad41b3c905585277 (diff) | |
refactormain
Diffstat (limited to 'lib/stochastic_momentum_index.c')
| -rw-r--r-- | lib/stochastic_momentum_index.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/stochastic_momentum_index.c b/lib/stochastic_momentum_index.c index 5491c30..35af230 100644 --- a/lib/stochastic_momentum_index.c +++ b/lib/stochastic_momentum_index.c @@ -26,7 +26,7 @@ ts_parameter_t const ts_stochastic_momentum_index_p = { .n_inputs = 4, .n_output uint_t ts_stochastic_momentum_index_offset( ts_constant_t const *c ) { ( void )c; - return ( c ? ((ts_stochastic_momentum_index_params_t *)c)->k1 + ((ts_stochastic_momentum_index_params_t *)c)->k2 : 0 ); + return ( c ? ((ts_stochastic_momentum_index_params_t const *)c)->k1 + ((ts_stochastic_momentum_index_params_t const *)c)->k2 : 0 ); } int ts_stochastic_momentum_index( @@ -37,9 +37,9 @@ int ts_stochastic_momentum_index( { TS_PROLOGUE( ts_stochastic_momentum_index_p ); if ( !c ) return -1; - uint_t k1 = ((ts_stochastic_momentum_index_params_t *)c)->k1; - uint_t k2 = ((ts_stochastic_momentum_index_params_t *)c)->k2; - uint_t signal_period = ((ts_stochastic_momentum_index_params_t *)c)->signal_period; + uint_t k1 = ((ts_stochastic_momentum_index_params_t const *)c)->k1; + uint_t k2 = ((ts_stochastic_momentum_index_params_t const *)c)->k2; + uint_t signal_period = ((ts_stochastic_momentum_index_params_t const *)c)->signal_period; if (k1 == 0 || k2 == 0) return -1; fp_t *midpoint = calloc(n, sizeof(fp_t)); |