-
Am I missing something? Not getting any results. require_once DIR.'/vendor/autoload.php'; // use LupeCode\phpTraderNative\Trader; $closes = array(112.82, 117.32, 113.49, 112, 115.355, 115.54, 112.13, 110.34, 106.84, 110.08, 111.81, 107.12, 108.22, 112.28); $ma_type = TRADER_MA_TYPE_SMA; // Simple Moving Average var_dump(Trader::bbands($closes, $time_period, $upper_deviation_multiplier, $lower_deviation_multiplier, $ma_type)); |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
You won't instantiate the Trader class. Remove this line $var = new Trader(); And do you have the $ma_type = \LupeCode\phpTraderNative\TALib\Enum\MovingAverageType::SMA; |
Beta Was this translation helpful? Give feedback.
You won't instantiate the Trader class. Remove this line
And do you have the
TRADER_MA_TYPE_SMA
constant set to something? Do you have the trader extension installed? If the answer to both of those is no then you need to use