@@ -677,7 +677,7 @@ public static function kama(int $startIdx, int $endIdx, array $inReal, int $optI
677677 $ tempReal2 = $ inReal [$ trailingIdx ++];
678678 $ periodROC = $ tempReal - $ tempReal2 ;
679679 $ trailingValue = $ tempReal2 ;
680- if ($ sumROC1 <= $ periodROC || -0.00000001 < $ sumROC1 && $ sumROC1 < 0.00000001 ) {
680+ if ($ sumROC1 <= $ periodROC || ( -0.00000001 < $ sumROC1 && $ sumROC1 < 0.00000001 ) ) {
681681 $ tempReal = 1.0 ;
682682 } else {
683683 $ tempReal = abs ($ periodROC / $ sumROC1 );
@@ -692,7 +692,7 @@ public static function kama(int $startIdx, int $endIdx, array $inReal, int $optI
692692 $ sumROC1 -= abs ($ trailingValue - $ tempReal2 );
693693 $ sumROC1 += abs ($ tempReal - $ inReal [$ today - 1 ]);
694694 $ trailingValue = $ tempReal2 ;
695- if ($ sumROC1 <= $ periodROC || -0.00000001 < $ sumROC1 && $ sumROC1 < 0.00000001 ) {
695+ if ($ sumROC1 <= $ periodROC || ( -0.00000001 < $ sumROC1 && $ sumROC1 < 0.00000001 ) ) {
696696 $ tempReal = 1.0 ;
697697 } else {
698698 $ tempReal = abs ($ periodROC / $ sumROC1 );
@@ -711,7 +711,7 @@ public static function kama(int $startIdx, int $endIdx, array $inReal, int $optI
711711 $ sumROC1 -= abs ($ trailingValue - $ tempReal2 );
712712 $ sumROC1 += abs ($ tempReal - $ inReal [$ today - 1 ]);
713713 $ trailingValue = $ tempReal2 ;
714- if ($ sumROC1 <= $ periodROC || -0.00000001 < $ sumROC1 && $ sumROC1 < 0.00000001 ) {
714+ if ($ sumROC1 <= $ periodROC || ( -0.00000001 < $ sumROC1 && $ sumROC1 < 0.00000001 ) ) {
715715 $ tempReal = 1.0 ;
716716 } else {
717717 $ tempReal = abs ($ periodROC / $ sumROC1 );
0 commit comments