-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathIndicator.php
More file actions
52 lines (47 loc) · 1.12 KB
/
Indicator.php
File metadata and controls
52 lines (47 loc) · 1.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
declare(strict_types=1);
namespace Tigusigalpa\TAAPI\Enums;
enum Indicator: string
{
case RSI = 'rsi';
case MACD = 'macd';
case EMA = 'ema';
case SMA = 'sma';
case BBANDS = 'bbands';
case STOCH = 'stoch';
case STOCHRSI = 'stochrsi';
case ATR = 'atr';
case ADX = 'adx';
case CCI = 'cci';
case AROON = 'aroon';
case MFI = 'mfi';
case OBV = 'obv';
case SAR = 'sar';
case SUPERTREND = 'supertrend';
case ICHIMOKU = 'ichimoku';
case VWAP = 'vwap';
case HMA = 'hma';
case WMA = 'wma';
case DEMA = 'dema';
case TEMA = 'tema';
case WILLIAMS = 'williams';
case UO = 'uo';
case ROC = 'roc';
case BULL_BEAR_POWER = 'bbp';
case AO = 'ao';
case CMF = 'cmf';
case KELTNER = 'keltner';
case DONCHIAN = 'donchian';
case PIVOT = 'pivot';
case FIBONACCI = 'fibonacci';
case VOLUME = 'volume';
case CANDLE = 'candle';
public static function fromString(string $indicator): self
{
return self::from(strtolower($indicator));
}
public function toString(): string
{
return $this->value;
}
}