Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
35 lines (31 loc) · 1.75 KB

File metadata and controls

35 lines (31 loc) · 1.75 KB
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
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
<?php
namespace LupeCode\phpTraderNative;
use LupeCode\phpTraderNative\TALib\Enum\MovingAverageType;
class LupeTraderFriendly extends TraderFriendly
{
/**
* Slow Stochastic Relative Strength Index
*
* @param array $real Array of real values.
* @param int $rsi_period [OPTIONAL] [DEFAULT 14, SUGGESTED 4-200] Number of period. Valid range from 2 to 100000.
* @param int $fastK_Period [OPTIONAL] [DEFAULT 5, SUGGESTED 1-200] Time period for building the Fast-K line. Valid range from 1 to 100000.
* @param int $slowK_Period [OPTIONAL] [DEFAULT 3, SUGGESTED 1-200] Smoothing for making the Slow-K line. Valid range from 1 to 100000, usually set to 3.
* @param int $slowK_MAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average for Slow-K. MovingAverageType::* series of constants should be used.
* @param int $slowD_Period [OPTIONAL] [DEFAULT 3, SUGGESTED 1-200] Smoothing for making the Slow-D line. Valid range from 1 to 100000.
* @param int $slowD_MAType [OPTIONAL] [DEFAULT TRADER_MA_TYPE_SMA] Type of Moving Average for Slow-D. MovingAverageType::* series of constants should be used.
*
* @return array Returns an array with calculated data. [SlowK => [...], SlowD => [...]]
* @throws \Exception
*/
public static function slowStochasticRelativeStrengthIndex(
array $real,
int $rsi_period = 14,
int $fastK_Period = 5,
int $slowK_Period = 3,
int $slowK_MAType = MovingAverageType::SMA->value,
int $slowD_Period = 3,
int $slowD_MAType = MovingAverageType::SMA->value
): array {
return LupeTrader::slowstochrsi($real, $rsi_period, $fastK_Period, $slowK_Period, $slowK_MAType, $slowD_Period, $slowD_MAType);
}
}
Morty Proxy This is a proxified and sanitized view of the page, visit original site.