diff options
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)); |