alangustavo/trader-supertrend

Get supertrend indicators from php and php-trader library

1.0.1 2022-12-03 01:45 UTC

This package is auto-updated.

Last update: 2025-06-29 02:16:40 UTC


README

This is a library that implements the supertrend indicator.

Requirements

  • PHP >= 7.0.0
  • Extension php_trader

Installation

This library is intended to be installed with composer.

composer require alangustavo/trader-supertrend

Usage

TraderSupertrend::get(array $high, array $low, array $close, $timePeriod, $multiplier);

it returns an array with:

[ 
    [
        'close' => 13.58332345,
        'type'  => '-1'
    ],
    [
        'close' => $12.5468844,
        'type'  => 1
    ]
]

where -1 = sell and 1 = buy.