summaryrefslogtreecommitdiffstats
path: root/lib/coppock_curve.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/coppock_curve.c')
-rw-r--r--lib/coppock_curve.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/coppock_curve.c b/lib/coppock_curve.c
index dfa1ad2..e192bd1 100644
--- a/lib/coppock_curve.c
+++ b/lib/coppock_curve.c
@@ -33,9 +33,9 @@ int ts_coppock_curve(
uint_t roc_short = 11;
uint_t wma_period = 10;
- if (n == 0 || n < roc_long) return -1;
+ if (n < roc_long) return -1;
- fp_t *combined = calloc( n, sizeof( fp_t ) );
+ fp_t *combined = calloc( n, sizeof( fp_t ) );
if ( !combined ) return -1;
for ( uint_t i = roc_long; i < n; ++i )
@@ -50,7 +50,7 @@ int ts_coppock_curve(
combined[i - roc_long] = roc14 + roc11;
}
- for (uint_t j = 0; j < n && j < roc_long; ++j) y[0][j] = 0;
+ for ( uint_t j = 0; j < n && j < roc_long; ++j ) y[0][j] = 0;
for ( uint_t i = roc_long; i < n; ++i )
{