Bug #75930 [NEW]: trader_bbands- error output

From: Date: Wed, 07 Feb 2018 15:22:17 +0000
Subject: Bug #75930 [NEW]: trader_bbands- error output
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-213844@lists.php.net to get a copy of this message
From: anton-praha at seznam dot cz Operating system: mac os 10.3.2 PHP version: 7.2.2 Package: *General Issues Bug Type: Bug Bug description:trader_bbands- error output Description: ------------ --- From manual page: http://www.php.net/function.trader-bbands --- In some cases, this function returns the same values for low, high, middle Bollinger bands. The next example does not count BB for the last 14 periods for me. var_dump($lastCloses); var_dump(trader_bbands($lastCloses, count($lastCloses), 2, 2, TRADER_MA_TYPE_SMA)); Output: array(14) { [0]=> float(0.0675) [1]=> float(0.0675) [2]=> float(0.0675) [3]=> float(0.0675) [4]=> float(0.06747) [5]=> float(0.06747) [6]=> float(0.06747) [7]=> float(0.06722) [8]=> float(0.06742) [9]=> float(0.06752) [10]=> float(0.06746) [11]=> float(0.06766) [12]=> float(0.06761) [13]=> float(0.06759) } array(3) { [0]=> array(1) { [13]=> float(0.06749214) } [1]=> array(1) { [13]=> float(0.06749214) } [2]=> array(1) { [13]=> float(0.06749214) } } Test script: --------------- var_dump($lastCloses); var_dump(trader_bbands($lastCloses, count($lastCloses), 2, 2, TRADER_MA_TYPE_SMA)); -- Edit bug report at https://bugs.php.net/bug.php?id=75930&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=75930&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=75930&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=75930&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=75930&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=75930&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=75930&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=75930&r=needscript Try newer version: https://bugs.php.net/fix.php?id=75930&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=75930&r=support Expected behavior: https://bugs.php.net/fix.php?id=75930&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=75930&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=75930&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=75930&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=75930&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=75930&r=dst IIS Stability: https://bugs.php.net/fix.php?id=75930&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=75930&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=75930&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=75930&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=75930&r=mysqlcfg

« previous php.bugs (#213844) next »