All Projects → laratrade → trader

laratrade / trader

Licence: MIT license
Laravel package for trader extension interface.

Programming Languages

PHP
23972 projects - #3 most used programming language

Projects that are alternatives of or similar to trader

Bitcoin Price Prediction
Bayesian regression for latent source model and Bitcoin
Stars: ✭ 234 (+444.19%)
Mutual labels:  trading
Algotrading
Algorithmic trading framework for cryptocurrencies.
Stars: ✭ 249 (+479.07%)
Mutual labels:  trading
blurhash
A PHP implementation of BlurHash with Laravel integration.
Stars: ✭ 46 (+6.98%)
Mutual labels:  laravel-package
Trading Backtest
A stock backtesting engine written in modern Java. And a pairs trading (cointegration) strategy implementation using a bayesian kalman filter model
Stars: ✭ 247 (+474.42%)
Mutual labels:  trading
Ta Rs
Technical analysis library for Rust language
Stars: ✭ 248 (+476.74%)
Mutual labels:  trading
nova-rating-field
A Star rating field to use in your Laravel Nova apps.
Stars: ✭ 42 (-2.33%)
Mutual labels:  laravel-package
Cryptotrader
A cryptocurrency trader for all famous exchanges
Stars: ✭ 228 (+430.23%)
Mutual labels:  trading
laravel-migrate-check
An artisan command to check for pending migrations with proper exit code
Stars: ✭ 53 (+23.26%)
Mutual labels:  laravel-package
Alpaca Backtrader Api
Alpaca Trading API integrated with backtrader
Stars: ✭ 246 (+472.09%)
Mutual labels:  trading
formoj
Form generator package for Laravel
Stars: ✭ 28 (-34.88%)
Mutual labels:  laravel-package
Starquant
a light-weighted, integrated trading/backtesting system/platform(综合量化交易回测系统/平台)
Stars: ✭ 250 (+481.4%)
Mutual labels:  trading
Crypto Trading Bot
Automated Bittrex crypto-currency technical analysis and trading tool
Stars: ✭ 251 (+483.72%)
Mutual labels:  trading
Instagram-for-PHP
PHP SDK for Instagram API
Stars: ✭ 82 (+90.7%)
Mutual labels:  laravel-package
Betfair
betfairlightweight - python wrapper for Betfair API-NG (with streaming)
Stars: ✭ 246 (+472.09%)
Mutual labels:  trading
laravel-packages
Useful packages for Laravel projects
Stars: ✭ 22 (-48.84%)
Mutual labels:  laravel-package
Deep Rl Trading
playing idealized trading games with deep reinforcement learning
Stars: ✭ 228 (+430.23%)
Mutual labels:  trading
madzipper
Wannabe successor of Chumper/Zipper package for Laravel
Stars: ✭ 114 (+165.12%)
Mutual labels:  laravel-package
Blankly
🚀 💸 Easily build, backtest and deploy your algo in just a few lines of code. Trade stocks, cryptos, and forex across exchanges w/ one package.
Stars: ✭ 1,456 (+3286.05%)
Mutual labels:  trading
LaravelPostcodes
A service wrapper around postcodes.io
Stars: ✭ 73 (+69.77%)
Mutual labels:  laravel-package
boilerplate
Laravel AdminLTE 3 Boilerplate package with blade components, users, roles and permissions management
Stars: ✭ 167 (+288.37%)
Mutual labels:  laravel-package

Laravel Trader

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Laravel package for trader extension interface.

Requirements

Make sure all dependencies have been installed before moving on:

Install

Pull the package via Composer:

$ composer require laratrade/trader

Usage

Via dependency injection

<?php

use Laratrade\Trader\Contracts\Trader;

class MyClass
{
    /**
     * The trader instance.
     *
     * @var Trader
     */
    protected $trader;

    /**
     * Create a new instance.
     *
     * @param Trader $trader
     */
    public function __construct(Trader $trader)
    {
        $this->indicatorManager = $trader;
    }
    
    /**
     * Handle my function.
     */
    public function myFunction()
    {
        ...
        $acos = $this->trader->acos($real);
        ...
    }
}

Via facade

<?php

use Laratrade\Trader\Facades\Trader;

class MyClass
{   
    /**
     * Handle my function.
     */
    public function myFunction()
    {
        ...
        $acos = Trader::acos($real);
        ...
    }
}

Via helper

<?php

class MyClass
{   
    /**
     * Handle my function.
     */
    public function myFunction()
    {
        ...
        $acos = trader()->acos($real);
        ...
    }
}

Constants

MA_TYPE_SMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_SMA;

MA_TYPE_EMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_EMA;

MA_TYPE_WMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_WMA;

MA_TYPE_DEMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_DEMA;

MA_TYPE_TEMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_TEMA;

MA_TYPE_TRIMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_TRIMA;

MA_TYPE_KAMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_KAMA;

MA_TYPE_MAMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_MAMA;

MA_TYPE_T3

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::MA_TYPE_T3;

REAL_MIN

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::REAL_MIN;

REAL_MAX

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::REAL_MAX;

FUNC_UNST_ADX

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_ADX;

FUNC_UNST_ADXR

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_ADXR;

FUNC_UNST_ATR

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_ATR;

FUNC_UNST_CMO

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_CMO;

FUNC_UNST_DX

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_DX;

FUNC_UNST_EMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_EMA;

FUNC_UNST_HT_DCPERIOD

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_HT_DCPERIOD;

FUNC_UNST_HT_DCPHASE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_HT_DCPHASE;

FUNC_UNST_HT_PHASOR

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_HT_PHASOR;

FUNC_UNST_HT_SINE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_HT_SINE;

FUNC_UNST_HT_TRENDLINE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_HT_TRENDLINE;

FUNC_UNST_HT_TRENDMODE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_HT_TRENDMODE;

FUNC_UNST_KAMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_KAMA;

FUNC_UNST_MAMA

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_MAMA;

FUNC_UNST_MFI

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_MFI;

FUNC_UNST_MINUS_DI

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_MINUS_DI;

FUNC_UNST_MINUS_DM

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_MINUS_DM;

FUNC_UNST_NATR

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_NATR;

FUNC_UNST_PLUS_DI

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_PLUS_DI;

FUNC_UNST_PLUS_DM

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_PLUS_DM;

FUNC_UNST_RSI

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_RSI;

FUNC_UNST_STOCHRSI

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_STOCHRSI;

FUNC_UNST_T3

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_T3;

FUNC_UNST_ALL

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_ALL;

FUNC_UNST_NONE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::FUNC_UNST_NONE;

COMPATIBILITY_DEFAULT

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::COMPATIBILITY_DEFAULT;

COMPATIBILITY_METASTOCK

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::COMPATIBILITY_METASTOCK;

ERR_SUCCESS

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_SUCCESS;

ERR_LIB_NOT_INITIALIZE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_LIB_NOT_INITIALIZE;

ERR_BAD_PARAM

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_BAD_PARAM;

ERR_ALLOC_ERR

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_ALLOC_ERR;

ERR_GROUP_NOT_FOUND

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_GROUP_NOT_FOUND;

ERR_FUNC_NOT_FOUND

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_FUNC_NOT_FOUND;

ERR_INVALID_HANDLE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_INVALID_HANDLE;

ERR_INVALID_PARAM_HOLDER

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_INVALID_PARAM_HOLDER;

ERR_INVALID_PARAM_HOLDER_TYPE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_INVALID_PARAM_HOLDER_TYPE;

ERR_INVALID_PARAM_FUNCTION

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_INVALID_PARAM_FUNCTION;

ERR_INPUT_NOT_ALL_INITIALIZE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_INPUT_NOT_ALL_INITIALIZE;

ERR_OUTPUT_NOT_ALL_INITIALIZE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_OUTPUT_NOT_ALL_INITIALIZE;

ERR_OUT_OF_RANGE_START_INDEX

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_OUT_OF_RANGE_START_INDEX;

ERR_OUT_OF_RANGE_END_INDEX

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_OUT_OF_RANGE_END_INDEX;

ERR_INVALID_LIST_TYPE

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_INVALID_LIST_TYPE;

ERR_BAD_OBJECT

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_BAD_OBJECT;

ERR_NOT_SUPPORTED

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_NOT_SUPPORTED;

ERR_INTERNAL_ERROR

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_INTERNAL_ERROR;

ERR_UNKNOWN_ERROR

<?php

use Laratrade\Trader\Contracts\Trader;

echo Trader::ERR_UNKNOWN_ERROR;

Functions

acos

Vector Trigonometric ACos

$result = Trader::acos($real);

ad

Chaikin A/D Line

$result = Trader::ad(array $high, array $low, array $close, array $volume);

add

Vector Arithmetic Add

$result = Trader::add(array $real0, array $real1);

adosc

Chaikin A/D Oscillator

$result = Trader::adosc(array $high, array $low, array $close, array $volume, int $fastPeriod = 3, int $slowPeriod = 10);

adx

Average Directional Movement Index

$result = Trader::adx(array $high, array $low, array $close, int $timePeriod = 14);

adxr

Average Directional Movement Index Rating

$result = Trader::adxr(array $high, array $low, array $close, int $timePeriod = 14);

apo

Absolute Price Oscillator

$result = Trader::apo(array $real, int $fastPeriod = 12, int $slowPeriod = 26, int $mAType = 0);

aroon

Aroon

$result = Trader::aroon(array $high, array $low, int $timePeriod = 14);

aroonosc

Aroon Oscillator

$result = Trader::aroonosc(array $high, array $low, int $timePeriod = 14);

asin

Vector Trigonometric ASin

$result = Trader::asin(array $real);

atan

Vector Trigonometric ATan

$result = Trader::atan(array $real);

atr

Average True Range

$result = Trader::atr(array $high, array $low, array $close, int $timePeriod = 14);

avgprice

Average Price

$result = Trader::avgprice(array $open, array $high, array $low, array $close);

bbands

Bollinger Bands

$result = Trader::bbands(array $real, int $timePeriod = 5, float $nbDevUp = 2.0, float $nbDevDn = 2.0, int $mAType = 0);

beta

Beta

$result = Trader::beta(array $real0, array $real1, int $timePeriod = 5);

bop

Balance Of Power

$result = Trader::bop(array $open, array $high, array $low, array $close);

cci

Commodity Channel Index

$result = Trader::cci(array $high, array $low, array $close, int $timePeriod = null);

cdl2crows

Two Crows

$result = Trader::cdl2crows(array $open, array $high, array $low, array $close);

cdl3blackcrows

Three Black Crows

$result = Trader::cdl3blackcrows(array $open, array $high, array $low, array $close);

cdl3inside

Three Inside Up/Down

$result = Trader::cdl3inside(array $open, array $high, array $low, array $close);

cdl3linestrike

Three-Line Strike

$result = Trader::cdl3linestrike(array $open, array $high, array $low, array $close);

cdl3outside

Three Outside Up/Down

$result = Trader::cdl3outside(array $open, array $high, array $low, array $close);

cdl3starsinsouth

Three Stars In The South

$result = Trader::cdl3starsinsouth(array $open, array $high, array $low, array $close);

cdl3whitesoldiers

Three Advancing White Soldiers

$result = Trader::cdl3whitesoldiers(array $open, array $high, array $low, array $close);

cdlabandonedbaby

Abandoned Baby

$result = Trader::cdlabandonedbaby(array $open, array $high, array $low, array $close, float $penetration = 0.3);

cdladvanceblock

Advance Block

$result = Trader::cdladvanceblock(array $open, array $high, array $low, array $close);

cdlbelthold

Belt-hold

$result = Trader::cdlbelthold(array $open, array $high, array $low, array $close);

cdlbreakaway

Breakaway

$result = Trader::cdlbreakaway(array $open, array $high, array $low, array $close);

cdlclosingmarubozu

Closing Marubozu

$result = Trader::cdlclosingmarubozu(array $open, array $high, array $low, array $close);

cdlconcealbabyswall

Concealing Baby Swallow

$result = Trader::cdlclosingmarubozu(array $open, array $high, array $low, array $close);

cdlcounterattack

Counterattack

$result = Trader::cdlconcealbabyswall(array $open, array $high, array $low, array $close);

cdldarkcloudcover

Dark Cloud Cover

$result = Trader::cdldarkcloudcover(array $open, array $high, array $low, array $close, float $penetration = 0.5);

cdldoji

Doji

$result = Trader::cdldoji(array $open, array $high, array $low, array $close);

cdldojistar

Doji Star

$result = Trader::cdldojistar(array $open, array $high, array $low, array $close);

cdldragonflydoji

Dragonfly Doji

$result = Trader::cdldragonflydoji(array $open, array $high, array $low, array $close);

cdlengulfing

Engulfing Pattern

$result = Trader::cdlengulfing(array $open, array $high, array $low, array $close);

cdleveningdojistar

Evening Doji Star

$result = Trader::cdleveningdojistar(array $open, array $high, array $low, array $close, float $penetration = 0.3);

cdleveningstar

Evening Star

$result = Trader::cdleveningstar(array $open, array $high, array $low, array $close, float $penetration = 0.3);

cdlgapsidesidewhite

Up/Down-gap side-by-side white lines

$result = Trader::cdlgapsidesidewhite(array $open, array $high, array $low, array $close);

cdlgravestonedoji

Gravestone Doji

$result = Trader::cdlgravestonedoji(array $open, array $high, array $low, array $close);

cdlhammer

Hammer

$result = Trader::cdlhammer(array $open, array $high, array $low, array $close);

cdlhangingman

Hanging Man

$result = Trader::cdlhangingman(array $open, array $high, array $low, array $close);

cdlharami

Harami Pattern

$result = Trader::cdlharami(array $open, array $high, array $low, array $close);

cdlharamicross

Harami Cross Pattern

$result = Trader::cdlharamicross(array $open, array $high, array $low, array $close);

cdlhighwave

High-Wave Candle

$result = Trader::cdlhighwave(array $open, array $high, array $low, array $close);

cdlhikkake

Hikkake Pattern

$result = Trader::cdlhikkake(array $open, array $high, array $low, array $close);

cdlhikkakemod

Modified Hikkake Pattern

$result = Trader::cdlhikkakemod(array $open, array $high, array $low, array $close);

cdlhomingpigeon

Homing Pigeon

$result = Trader::cdlhomingpigeon(array $open, array $high, array $low, array $close);

cdlidentical3crows

Identical Three Crows

$result = Trader::cdlidentical3crows(array $open, array $high, array $low, array $close);

cdlinneck

In-Neck Pattern

$result = Trader::cdlinneck(array $open, array $high, array $low, array $close);

cdlinvertedhammer

Inverted Hammer

$result = Trader::cdlinvertedhammer(array $open, array $high, array $low, array $close);

cdlkicking

Kicking

$result = Trader::cdlkicking(array $open, array $high, array $low, array $close);

cdlkickingbylength

Kicking - bull/bear determined by the longer marubozu

$result = Trader::cdlkickingbylength(array $open, array $high, array $low, array $close);

cdlladderbottom

Ladder Bottom

$result = Trader::cdlladderbottom(array $open, array $high, array $low, array $close);

cdllongleggeddoji

Long Legged Doji

$result = Trader::cdllongleggeddoji(array $open, array $high, array $low, array $close);

cdllongline

Long Line Candle

$result = Trader::cdllongline(array $open, array $high, array $low, array $close);

cdlmarubozu

Marubozu

$result = Trader::cdlmarubozu(array $open, array $high, array $low, array $close);

cdlmatchinglow

Matching Low

$result = Trader::cdlmatchinglow(array $open, array $high, array $low, array $close);

cdlmathold

Mat Hold

$result = Trader::cdlmathold(array $open, array $high, array $low, array $close, float $penetration = 0.5);

cdlmorningdojistar

Morning Doji Star

$result = Trader::cdlmorningdojistar(array $open, array $high, array $low, array $close, float $penetration = 0.3);

cdlmorningstar

Morning Star

$result = Trader::cdlmorningstar(array $open, array $high, array $low, array $close, float $penetration = 0.3);

cdlonneck

On-Neck Pattern

$result = Trader::cdlonneck(array $open, array $high, array $low, array $close);

cdlpiercing

Piercing Pattern

$result = Trader::cdlpiercing(array $open, array $high, array $low, array $close);

cdlrickshawman

Rickshaw Man

$result = Trader::cdlrickshawman(array $open, array $high, array $low, array $close);

cdlrisefall3methods

Rising/Falling Three Methods

$result = Trader::cdlrisefall3methods(array $open, array $high, array $low, array $close);

cdlseparatinglines

Separating Lines

$result = Trader::cdlseparatinglines(array $open, array $high, array $low, array $close);

cdlshootingstar

Shooting Star

$result = Trader::cdlshootingstar(array $open, array $high, array $low, array $close);

cdlshortline

Short Line Candle

$result = Trader::cdlshortline(array $open, array $high, array $low, array $close);

cdlspinningtop

Spinning Top

$result = Trader::cdlspinningtop(array $open, array $high, array $low, array $close);

cdlstalledpattern

Stalled Pattern

$result = Trader::cdlstalledpattern(array $open, array $high, array $low, array $close);

cdlsticksandwich

Stick Sandwich

$result = Trader::cdlsticksandwich(array $open, array $high, array $low, array $close);

cdltakuri

Takuri (Dragonfly Doji with very long lower shadow)

$result = Trader::cdltakuri(array $open, array $high, array $low, array $close);

cdltasukigap

Tasuki Gap

$result = Trader::cdltasukigap(array $open, array $high, array $low, array $close);

cdlthrusting

Thrusting Pattern

$result = Trader::cdlthrusting(array $open, array $high, array $low, array $close);

cdltristar

Tristar Pattern

$result = Trader::cdltristar(array $open, array $high, array $low, array $close);

cdlunique3river

Unique 3 River

$result = Trader::cdlunique3river(array $open, array $high, array $low, array $close);

cdlupsidegap2crows

Upside Gap Two Crows

$result = Trader::cdlupsidegap2crows(array $open, array $high, array $low, array $close);

cdlxsidegap3methods

Upside/Downside Gap Three Methods

$result = Trader::cdlxsidegap3methods(array $open, array $high, array $low, array $close);

ceil

Vector Ceil

$result = Trader::ceil(array $real);

cmo

Chande Momentum Oscillator

$result = Trader::cmo(array $real, int $timePeriod = 14);

correl

Pearson's Correlation Coefficient (r)

$result = Trader::correl(array $real0, array $real1, int $timePeriod = 30);

cos

Vector Trigonometric Cos

$result = Trader::cos(array $real);

cosh

Vector Trigonometric Cosh

$result = Trader::cosh(array $real);

dema

Double Exponential Moving Average

$result = Trader::dema(array $real, int $timePeriod = 30);

div

Vector Arithmetic Div

$result = Trader::div(array $real0, array $real1);

dx

Directional Movement Index

$result = Trader::dx(array $high, array $low, array $close, int $timePeriod = 14);

ema

Exponential Moving Average

$result = Trader::ema(array $real, int $timePeriod = 30);

errno

Get error code

$result = Trader::errno();

exp

Vector Arithmetic Exp

$result = Trader::exp(array $real);

floor

Vector Floor

$result = Trader::floor(array $real);

get_compat

Get compatibility mode

$result = Trader::get_compat();

get_unstable_period

Get unstable period

$result = Trader::get_unstable_period(int $functionId);

ht_dcperiod

Hilbert Transform - Dominant Cycle Period

$result = Trader::ht_dcperiod(array $real);

ht_dcphase

Hilbert Transform - Dominant Cycle Phase

$result = Trader::ht_dcphase(array $real);

ht_phasor

Hilbert Transform - Phasor Components

$result = Trader::ht_phasor(array $open, array $close);

ht_sine

Hilbert Transform - SineWave

$result = Trader::ht_sine(array $open, array $close);

ht_trendline

Hilbert Transform - Instantaneous Trendline

$result = Trader::ht_trendline(array $real);

ht_trendmode

Hilbert Transform - Trend vs Cycle Mode

$result = Trader::ht_trendmode(array $real);

kama

Kaufman Adaptive Moving Average

$result = Trader::kama(array $real, int $timePeriod = 30);

linearreg_angle

Linear Regression Angle

$result = Trader::linearreg_angle(array $real, int $timePeriod = 14);

linearreg_intercept

Linear Regression Intercept

$result = Trader::linearreg_intercept(array $real, int $timePeriod = 14);

linearreg_slope

Linear Regression Slope

$result = Trader::linearreg_slope(array $real, int $timePeriod = 14);

linearreg

Linear Regression

$result = Trader::linearreg(array $real, int $timePeriod = 14);

ln

Vector Log Natural

$result = Trader::ln(array $real);

log10

Vector Log10

$result = Trader::log10(array $real);

ma

Moving average

$result = Trader::ma(array $real, int $timePeriod = 30, int $mAType = 0);

macd

Moving Average Convergence/Divergence

$result = Trader::macd(array $real, int $fastPeriod = 12, int $slowPeriod = 26, int $signalPeriod = 9);

macdext

MACD with controllable MA type

$result = Trader::macdext(array $real, int $fastPeriod = 12, int $fastMAType = 0, int $slowPeriod = 26, int $slowMAType = 0, int $signalPeriod = 9);

macdfix

Moving Average Convergence/Divergence Fix 12/26

$result = Trader::macdfix(array $real, int $signalPeriod = 9);

mama

MESA Adaptive Moving Average

$result = Trader::mama(array $real, float $fastLimit = 0.5, float $slowLimit = 0.05);

mavp

Moving average with variable period

$result = Trader::mavp(array $real, array $periods, int $minPeriod = 2, int $maxPeriod = 30, int $mAType = 0);

max

Highest value over a specified period

$result = Trader::max(array $real, int $timePeriod = 30);

maxindex

Index of highest value over a specified period

$result = Trader::maxindex(array $real, int $timePeriod = 30);

medprice

Median Price

$result = Trader::medprice(array $high, array $low);

mfi

Money Flow Index

$result = Trader::mfi(array $high, array $low, array $close, array $volume, int $timePeriod = 14);

midpoint

MidPoint over period

$result = Trader::midpoint(array $real, int $timePeriod = 14);

midprice

Midpoint Price over period

$result = Trader::midprice(array $high, array $low, int $timePeriod = 14);

min

Lowest value over a specified period

$result = Trader::min(array $real, int $timePeriod = 30);

minindex

Index of lowest value over a specified period

$result = Trader::minindex(array $real, int $timePeriod = 30);

minmax

Lowest and highest values over a specified period

$result = Trader::minmax(array $real, int $timePeriod = 30);

minmaxindex

Indexes of lowest and highest values over a specified period

$result = Trader::minmaxindex(array $real, int $timePeriod = 30);

minus_di

Minus Directional Indicator

$result = Trader::minus_di(array $high, array $low, array $close, int $timePeriod = 14);

minus_dm

Minus Directional Movement

$result = Trader::minus_dm(array $high, array $low, int $timePeriod = 14);

mom

Momentum

$result = Trader::mom(array $real, int $timePeriod = 10);

mult

Vector Arithmetic Mult

$result = Trader::mult(array $real0, array $real1);

natr

Normalized Average True Range

$result = Trader::natr(array $high, array $low, array $close, int $timePeriod = 14);

obv

On Balance Volume

$result = Trader::obv(array $real, array $volume);

plus_di

Plus Directional Indicator

$result = Trader::plus_di(array $high, array $low, array $close, int $timePeriod = 14);

plus_dm

Plus Directional Movement

$result = Trader::plus_dm(array $high, array $low, int $timePeriod = 14);

ppo

Percentage Price Oscillator

$result = Trader::ppo(array $real, int $fastPeriod = 12, int $slowPeriod = 26, int $mAType = 0);

roc

Rate of change : ((price/prevPrice)-1)*100

$result = Trader::roc(array $real, int $timePeriod = 10);

rocp

Rate of change Percentage: (price-prevPrice)/prevPrice

$result = Trader::rocp(array $real, int $timePeriod = 10);

rocr100

Rate of change ratio 100 scale: (price/prevPrice)*100

$result = Trader::rocr100(array $real, int $timePeriod = 10);

rocr

Rate of change ratio: (price/prevPrice)

$result = Trader::rocr(array $real, int $timePeriod = 10);

rsi

Relative Strength Index

$result = Trader::rsi(array $real, int $timePeriod = 14);

sar

Parabolic SAR

$result = Trader::sar(array $high, array $low, float $acceleration = 0.02, float $maximum = 0.2);

sarext

Parabolic SAR - Extended

$result = Trader::sarext(array $high, array $low, float $startValue = 0.0, float $offsetOnReverse = 0.0, float $accelerationInitLong = 0.02, float $accelerationLong = 0.02, float $accelerationMaxLong = 0.2, float $accelerationInitShort = 0.02, float $accelerationShort = 0.02, float $accelerationMaxShort = 0.2);

set_compat

Set compatibility mode

Trader::set_compat(int $compatId);

set_unstable_period

Set unstable period

Trader::set_unstable_period(int $functionId, int $timePeriod);

sin

Vector Trigonometric Sin

$result = Trader::sin(array $real);

sinh

Vector Trigonometric Sinh

$result = Trader::sinh(array $real);

sma

Simple Moving Average

$result = Trader::sma(array $real, int $timePeriod = 30);

sqrt

Vector Square Root

$result = Trader::sqrt(array $real);

stddev

Standard Deviation

$result = Trader::stddev(array $real, int $timePeriod = 5, float $nbDev = 1.0);

stoch

Stochastic

$result = Trader::stoch(array $high, array $low, array $close, int $fastK_Period = 5, int $slowK_Period = 3, int $slowK_MAType = 0, int $slowD_Period = 3, int $slowD_MAType = 0);

stochf

Stochastic Fast

$result = Trader::stochf(array $high, array $low, array $close, int $fastK_Period = 5, int $fastD_Period = 3, int $fastD_MAType = 0);

stochrsi

Stochastic Relative Strength Index

$result = Trader::stochrsi(array $real, int $timePeriod = 14, int $fastK_Period = 5, int $fastD_Period = 3, int $fastD_MAType = 0);

sub

Vector Arithmetic Subtraction

$result = Trader::sub(array $real0, array $real1);

sum

Summation

$result = Trader::sum(array $real, int $timePeriod = 30);

t3

Triple Exponential Moving Average (T3)

$result = Trader::t3(array $real, int $timePeriod = 5, float $vFactor = 0.7);

tan

Vector Trigonometric Tan

$result = Trader::tan(array $real);

tanh

Vector Trigonometric Tanh

$result = Trader::tanh(array $real);

tema

Triple Exponential Moving Average

$result = Trader::tema(array $real, int $timePeriod = 30);

trange

True Range

$result = Trader::trange(array $high, array $low, array $close);

trima

Triangular Moving Average

$result = Trader::trima(array $real, int $timePeriod = 30);

trix

1-day Rate-Of-Change (ROC) of a Triple Smooth EMA

$result = Trader::trix(array $real, int $timePeriod = 30);

tsf

Time Series Forecast

$result = Trader::tsf(array $real, int $timePeriod = 14);

typprice

Typical Price

$result = Trader::typprice(array $high, array $low, array $close);

ultosc

Ultimate Oscillator

$result = Trader::ultosc(array $high, array $low, array $close, int $timePeriod1 = 7, int $timePeriod2 = 14, int $timePeriod3 = 28);

var

Variance

$result = Trader::var(array $real, int $timePeriod = 5, float $nbDev = 1.0);

wclprice

Weighted Close Price

$result = Trader::wclprice(array $high, array $low, array $close);

willr

Williams' %R

$result = Trader::willr(array $high, array $low, array $close, int $timePeriod = 14);

wma

Weighted Moving Average

$result = Trader::wma(array $real, int $timePeriod = 30);

Testing

$ composer test

Security

If you discover any security related issues, please use the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].