Download the PHP package trademinator/indicators without Composer

On this page you can find all versions of the php package trademinator/indicators. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package indicators

trademinator/indicators

Framework-independent technical indicators, candlestick patterns and ticker utilities for CCXT OHLCV data, using trademinator/bcmath and PHP's native BCMath extension.

PHP 8.2 or newer is required. Modern millisecond timestamps require a 64-bit PHP build. Laravel and CCXT are not runtime dependencies: Laravel can inject the calculator, and CCXT can supply the input arrays, but the library does not fetch data or resolve application configuration.

From this source checkout

The archive does not include vendor/ or a library lockfile. A native-runtime CI workflow is included for PHP 8.2, 8.3, 8.4 and 8.5. See validation status for what was actually run before packaging.

After publishing the package, consumers can install it with:

Before publication, a consumer can use a sibling source directory:

Normalize every CCXT OHLCV fetch

CCXT OHLCV rows have this positional shape:

Call normalize_ticker() immediately after each fetch, including every fetched page, backfill batch, retry result or refreshed batch. The package does not intercept arbitrary CCXT calls on your behalf.

Both the function and the trait method mutate the array by reference and return it. They share exactly one implementation. The default reindex: false preserves input keys. With reindexing enabled, the default index unit is seconds; use milliseconds when sub-second timestamps must remain distinct.

Normalized rows contain open, high, low, close, and volume as decimal strings. human_date is a UTC YmdHis string. The legacy microtimestamp field is preserved and contains milliseconds, not microseconds. Named metadata columns survive normalization; numeric CCXT columns are replaced with names.

Normalization expands scientific notation, validates OHLCV relationships at the represented input precision, and performs no exchange rounding. A missing/null volume retains the legacy zero default. Invalid batches leave the original array unchanged. Normalization does not sort candles, fill gaps, remove an unfinished current candle, or recover precision already lost before a value arrived as a PHP float. Those ingestion decisions belong to the application.

Use the traits directly

The independently usable traits are:

Technical.php is the spelling used by the source repository. No Bc trait is copied into this package. Arithmetic helpers are imported with use function Trademinator\BcMath\...; precision types are imported from Trademinator\BcMath.

Precision without application globals

There are no runtime references to EXCHANGE_ROUND_DECIMALS, no environment/configuration lookups, no Laravel helpers, no global debug output, and no changes to the process-wide bcscale() setting in this package's source.

By default, the calculator uses PrecisionPolicy from trademinator/bcmath: minimum scale 16, four guard digits, maximum scale 32, and insignificant trailing zeros ignored. Calculation precision adapts to relevant inputs, with recurrence state preserved without repeatedly adding guard digits. Inputs finer than the policy's cap require a higher maximumScale.

Calculation precision is not an exchange's order precision or a display-decimal setting. Results remain decimal strings; formatting and order quantization belong at their respective application boundaries.

Reuse a resolved context

A supplied context makes technical_scale() an O(1) scale lookup instead of resolving decimal precision from its inputs. A context can also be resolved once with PrecisionContext::fromValues($representativeValues, $policy) or PrecisionContext::forPrices(...). Include the finest relevant price/volume precision; a context is deliberately fixed and will not silently expand when a later batch introduces more digits. Keep it stable across all slices of the same calculation.

A context can be passed to an individual calculation as the optional final argument:

A per-call override calculates using a clone. It does not change the original calculator. Nested indicator calls reuse the clone's context. Trait consumers can use setPrecisionPolicy(), setPrecisionContext() and withPrecisionContext() without adopting a constructor. Explicit comparison precision arguments to compare(), consecutive() and min_max() remain available and take precedence for those comparisons.

Bollinger standard deviation temporarily uses twice the resolved scale for squared deltas, then publishes at the resolved scale; otherwise tiny nonzero variance can disappear during squaring. Very low explicit scales can be inappropriate for ratio/logarithmic indicators; choppiness rejects a scale that cannot represent log10(period).

Laravel

Use the same Indicators class and traits. An optional, application-owned service provider is shown in examples/IndicatorServiceProvider.php. Configuration is resolved in the application, not in the library. The provider uses bind, not a shared mutable singleton; per-market fixed contexts can then be supplied by the application.

No provider or facade is auto-registered, and illuminate/* is not required.

Indicators and migration

The existing domain method names and by-reference array style are retained. See streaming requirements.

This extraction intentionally changes precision and removes presentation truncation. It also handles empty/zero inputs and previously undefined warm-up outputs. It is not a promise of byte-for-byte output compatibility with the old eight-decimal implementation. The migration guide identifies these differences.

is_dragonfly() and is_grave_stone() remain explicitly quarantined with LogicException; they were unfinished in the source. Existing pattern heuristics, including their legacy 0.001 stabilizer, are retained rather than presented as a new pattern-definition standard. inflexion() is retrospective and may mark an earlier row after seeing the next one.

Examples

examples/basic.php is deterministic and needs no exchange connection. examples/ccxt.php shows the CCXT ingestion boundary. examples/IndicatorServiceProvider.php is an optional Laravel integration example.

License and provenance

MIT. Derived from the Trademinator Server traits. See source provenance. This source archive has not been pushed, tagged, or published to a package registry.


All versions of indicators with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
ext-bcmath Version *
ext-ctype Version *
trademinator/bcmath Version ^0.1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package trademinator/indicators contains the following files

Loading the files please wait ...