|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #81590 trader_max and trader_min are performing very slow
Submitted: 2021-11-04 13:52 UTC Modified: 2021-12-01 13:26 UTC
From: marcus dot ruhnau at gmail dot com Assigned:
Status: Open Package: PECL (PECL)
PHP Version: 8.0.12 OS: CENTOS 7
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: marcus dot ruhnau at gmail dot com
New email:
PHP Version: OS:


 [2021-11-04 13:52 UTC] marcus dot ruhnau at gmail dot com
I tried to do multiple calculations on AAPL chart (closeprice) and always tried to get the last 50 bars. I took nearly 5 seconds for the calculation. The other functions in trader extention are much, much faster.

Just wanted to get a range (Max and Min) from if a stock price is stable

Test script:
in a very simple for loop of the array data 

I have data from 1980

$maximum = trader_max($highing,50)[$i];
$minimum = trader_min($lowing,50)[$i];

Actual result:
The result is correct, but the time required is too long


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2021-12-01 13:26 UTC]
-Package: Trader +Package: *General Issues
 [2021-12-01 13:26 UTC]
You might be better off to report that at
 [2021-12-01 13:26 UTC]
-Package: *General Issues +Package: PECL
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Wed Oct 04 20:01:25 2023 UTC