Skip to content

Trading indicators library for PHP, based on "trader" extension.

Notifications You must be signed in to change notification settings

doxadoxa/php-indicators

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

PHP Indicators

Trading indicators library. It's need for simplify working with trader extension.

Requires

  • php 7.3+
  • ext-trader

Install

composer install doxadoxa/phpindicators

Tests

Test not exists yet.

Example

$klines = ExternalApi::getKlines('btcusdt', '1m');

$ohlvc = new OHLVC( $klines );

$sma14 = $ohlvc->close()->sma(14);
$sma3 = $ohlvc->close()->sma(3);
$atr = $ohlvc->atr(3);

if ( $sma3->crossBelow( $sma14 ) ) {
    Trader::setStopLossOn( $sma3[0] - $atr[0] * 10 );
}

About

Trading indicators library for PHP, based on "trader" extension.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages