Skip to content
This repository was archived by the owner on May 8, 2025. It is now read-only.

Commit 2d26fe6

Browse files
committed
use $data in sma()
1 parent f3379fc commit 2d26fe6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/phpFITFileAnalysis.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1684,7 +1684,7 @@ private function sma($array, $time_period)
16841684
$count = count($array);
16851685

16861686
for ($i=0; $i<$count-$time_period; ++$i) {
1687-
$sma_data[] = array_sum(array_slice($array, $i, $time_period)) / $time_period;
1687+
$sma_data[] = array_sum(array_slice($data, $i, $time_period)) / $time_period;
16881688
}
16891689

16901690
return $sma_data;

0 commit comments

Comments
 (0)