Complex classes like CallsFunctions often do a lot of different things. To break such a class down, we need to identify a cohesive component within that class. A common approach to find such a component is to look for fields/methods that share the same prefixes, or suffixes. You can also have a look at the cohesion graph to spot any un-connected, or weakly-connected components.
Once you have determined the fields that belong together, you can apply the Extract Class refactoring. If the component makes sense as a sub-class, Extract Subclass is also a candidate, and is often faster.
While breaking up the class, it is a good idea to analyze how other classes use CallsFunctions, and based on these observations, apply Extract Interface, too.
1 | <?php |
||
12 | trait CallsFunctions |
||
13 | { |
||
14 | /** |
||
15 | * Vector Trigonometric ACos. |
||
16 | * |
||
17 | * Calculates the arc cosine for each value in real and returns the resulting array. |
||
18 | * |
||
19 | * @param array $real Array of real values. |
||
20 | * |
||
21 | * @return array Returns an array with calculated data. |
||
22 | */ |
||
23 | 2 | public function acos(array $real): array |
|
31 | |||
32 | /** |
||
33 | * Chaikin A/D Line. |
||
34 | * |
||
35 | * @param array $high High price, array of real values. |
||
36 | * @param array $low Low price, array of real values. |
||
37 | * @param array $close Closing price, array of real values. |
||
38 | * @param array $volume Volume traded, array of real values. |
||
39 | * |
||
40 | * @return array Returns an array with calculated data. |
||
41 | */ |
||
42 | 2 | public function ad(array $high, array $low, array $close, array $volume): array |
|
50 | |||
51 | /** |
||
52 | * Vector Arithmetic Add. |
||
53 | * |
||
54 | * Calculates the vector addition of real0 to real1 and returns the resulting vector. |
||
55 | * |
||
56 | * @param array $real0 Array of real values. |
||
57 | * @param array $real1 Array of real values. |
||
58 | * |
||
59 | * @return array Returns an array with calculated data. |
||
60 | */ |
||
61 | 2 | public function add(array $real0, array $real1): array |
|
69 | |||
70 | /** |
||
71 | * Chaikin A/D Oscillator. |
||
72 | * |
||
73 | * @param array $high High price, array of real values. |
||
74 | * @param array $low Low price, array of real values. |
||
75 | * @param array $close Closing price, array of real values. |
||
76 | * @param array $volume Volume traded, array of real values. |
||
77 | * @param int $fastPeriod Number of period for the fast MA. Valid range from 2 to 100000. |
||
78 | * @param int $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000. |
||
79 | * |
||
80 | * @return array Returns an array with calculated data. |
||
81 | */ |
||
82 | public function adosc( |
||
96 | |||
97 | /** |
||
98 | * Average Directional Movement Index. |
||
99 | * |
||
100 | * @param array $high High price, array of real values. |
||
101 | * @param array $low Low price, array of real values. |
||
102 | * @param array $close Closing price, array of real values. |
||
103 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
104 | * |
||
105 | * @return array Returns an array with calculated data. |
||
106 | */ |
||
107 | public function adx(array $high, array $low, array $close, int $timePeriod = 14): array |
||
115 | |||
116 | /** |
||
117 | * Average Directional Movement Index Rating. |
||
118 | * |
||
119 | * @param array $high High price, array of real values. |
||
120 | * @param array $low Low price, array of real values. |
||
121 | * @param array $close Closing price, array of real values. |
||
122 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
123 | * |
||
124 | * @return array Returns an array with calculated data. |
||
125 | */ |
||
126 | public function adxr(array $high, array $low, array $close, int $timePeriod = 14): array |
||
134 | |||
135 | /** |
||
136 | * Absolute Price Oscillator. |
||
137 | * |
||
138 | * @param array $real Array of real values. |
||
139 | * @param int $fastPeriod Number of period for the fast MA. Valid range from 2 to 100000. |
||
140 | * @param int $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000. |
||
141 | * @param int $mAType Type of Moving Average. MA_TYPE_* series of constants should be used. |
||
142 | * |
||
143 | * @return array Returns an array with calculated data. |
||
144 | */ |
||
145 | public function apo(array $real, int $fastPeriod = 12, int $slowPeriod = 26, int $mAType = 0): array |
||
153 | |||
154 | /** |
||
155 | * Aroon. |
||
156 | * |
||
157 | * @param array $high High price, array of real values. |
||
158 | * @param array $low Low price, array of real values. |
||
159 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
160 | * |
||
161 | * @return array Returns an array with calculated data. |
||
162 | */ |
||
163 | public function aroon(array $high, array $low, int $timePeriod = 14): array |
||
171 | |||
172 | /** |
||
173 | * Aroon Oscillator. |
||
174 | * |
||
175 | * @param array $high High price, array of real values. |
||
176 | * @param array $low Low price, array of real values. |
||
177 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
178 | * |
||
179 | * @return array Returns an array with calculated data. |
||
180 | */ |
||
181 | public function aroonosc(array $high, array $low, int $timePeriod = 14): array |
||
189 | |||
190 | /** |
||
191 | * Vector Trigonometric ASin. |
||
192 | * |
||
193 | * @param array $real Array of real values. |
||
194 | * |
||
195 | * @return array Returns an array with calculated data. |
||
196 | */ |
||
197 | public function asin(array $real): array |
||
205 | |||
206 | /** |
||
207 | * Vector Trigonometric ATan. |
||
208 | * |
||
209 | * @param array $real Array of real values. |
||
210 | * |
||
211 | * @return array Returns an array with calculated data. |
||
212 | */ |
||
213 | public function atan(array $real): array |
||
221 | |||
222 | /** |
||
223 | * Average True Range. |
||
224 | * |
||
225 | * @param array $high High price, array of real values. |
||
226 | * @param array $low Low price, array of real values. |
||
227 | * @param array $close Closing price, array of real values. |
||
228 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
229 | * |
||
230 | * @return array Returns an array with calculated data. |
||
231 | */ |
||
232 | public function atr(array $high, array $low, array $close, int $timePeriod = 14): array |
||
240 | |||
241 | /** |
||
242 | * Average Price. |
||
243 | * |
||
244 | * @param array $open Opening price, array of real values. |
||
245 | * @param array $high High price, array of real values. |
||
246 | * @param array $low Low price, array of real values. |
||
247 | * @param array $close Closing price, array of real values. |
||
248 | * |
||
249 | * @return array Returns an array with calculated data. |
||
250 | */ |
||
251 | public function avgprice(array $open, array $high, array $low, array $close): array |
||
259 | |||
260 | /** |
||
261 | * Bollinger Bands. |
||
262 | * |
||
263 | * @param array $real Array of real values. |
||
264 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
265 | * @param float $nbDevUp Deviation multiplier for upper band. Valid range from REAL_MIN to REAL_MAX. |
||
266 | * @param float $nbDevDn Deviation multiplier for lower band. Valid range from REAL_MIN to REAL_MAX. |
||
267 | * @param int $mAType Type of Moving Average. MA_TYPE_* series of constants should be used. |
||
268 | * |
||
269 | * @return array Returns an array with calculated data. |
||
270 | */ |
||
271 | public function bbands( |
||
284 | |||
285 | /** |
||
286 | * Beta. |
||
287 | * |
||
288 | * @param array $real0 Array of real values. |
||
289 | * @param array $real1 Array of real values. |
||
290 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
291 | * |
||
292 | * @return array Returns an array with calculated data. |
||
293 | */ |
||
294 | public function beta(array $real0, array $real1, int $timePeriod = 5): array |
||
302 | |||
303 | /** |
||
304 | * Balance Of Power. |
||
305 | * |
||
306 | * @param array $open Opening price, array of real values. |
||
307 | * @param array $high High price, array of real values. |
||
308 | * @param array $low Low price, array of real values. |
||
309 | * @param array $close Closing price, array of real values. |
||
310 | * |
||
311 | * @return array Returns an array with calculated data. |
||
312 | */ |
||
313 | public function bop(array $open, array $high, array $low, array $close): array |
||
321 | |||
322 | /** |
||
323 | * Commodity Channel Index. |
||
324 | * |
||
325 | * @param array $high High price, array of real values. |
||
326 | * @param array $low Low price, array of real values. |
||
327 | * @param array $close Closing price, array of real values. |
||
328 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
329 | * |
||
330 | * @return array Returns an array with calculated data. |
||
331 | */ |
||
332 | public function cci(array $high, array $low, array $close, int $timePeriod = null): array |
||
340 | |||
341 | /** |
||
342 | * Two Crows. |
||
343 | * |
||
344 | * @param array $open Opening price, array of real values. |
||
345 | * @param array $high High price, array of real values. |
||
346 | * @param array $low Low price, array of real values. |
||
347 | * @param array $close Closing price, array of real values. |
||
348 | * |
||
349 | * @return array Returns an array with calculated data. |
||
350 | */ |
||
351 | public function cdl2crows(array $open, array $high, array $low, array $close): array |
||
359 | |||
360 | /** |
||
361 | * Three Black Crows. |
||
362 | * |
||
363 | * @param array $open Opening price, array of real values. |
||
364 | * @param array $high High price, array of real values. |
||
365 | * @param array $low Low price, array of real values. |
||
366 | * @param array $close Closing price, array of real values. |
||
367 | * |
||
368 | * @return array Returns an array with calculated data. |
||
369 | */ |
||
370 | public function cdl3blackcrows(array $open, array $high, array $low, array $close): array |
||
378 | |||
379 | /** |
||
380 | * Three Inside Up/Down. |
||
381 | * |
||
382 | * @param array $open Opening price, array of real values. |
||
383 | * @param array $high High price, array of real values. |
||
384 | * @param array $low Low price, array of real values. |
||
385 | * @param array $close Closing price, array of real values. |
||
386 | * |
||
387 | * @return array Returns an array with calculated data. |
||
388 | */ |
||
389 | public function cdl3inside(array $open, array $high, array $low, array $close): array |
||
397 | |||
398 | /** |
||
399 | * Three-Line Strike |
||
400 | * |
||
401 | * @param array $open Opening price, array of real values. |
||
402 | * @param array $high High price, array of real values. |
||
403 | * @param array $low Low price, array of real values. |
||
404 | * @param array $close Closing price, array of real values. |
||
405 | * |
||
406 | * @return array Returns an array with calculated data. |
||
407 | */ |
||
408 | public function cdl3linestrike(array $open, array $high, array $low, array $close): array |
||
416 | |||
417 | /** |
||
418 | * Three Outside Up/Down. |
||
419 | * |
||
420 | * @param array $open Opening price, array of real values. |
||
421 | * @param array $high High price, array of real values. |
||
422 | * @param array $low Low price, array of real values. |
||
423 | * @param array $close Closing price, array of real values. |
||
424 | * |
||
425 | * @return array Returns an array with calculated data. |
||
426 | */ |
||
427 | public function cdl3outside(array $open, array $high, array $low, array $close): array |
||
435 | |||
436 | /** |
||
437 | * Three Stars In The South. |
||
438 | * |
||
439 | * @param array $open Opening price, array of real values. |
||
440 | * @param array $high High price, array of real values. |
||
441 | * @param array $low Low price, array of real values. |
||
442 | * @param array $close Closing price, array of real values. |
||
443 | * |
||
444 | * @return array Returns an array with calculated data. |
||
445 | */ |
||
446 | public function cdl3starsinsouth(array $open, array $high, array $low, array $close): array |
||
454 | |||
455 | /** |
||
456 | * Three Advancing White Soldiers. |
||
457 | * |
||
458 | * @param array $open Opening price, array of real values. |
||
459 | * @param array $high High price, array of real values. |
||
460 | * @param array $low Low price, array of real values. |
||
461 | * @param array $close Closing price, array of real values. |
||
462 | * |
||
463 | * @return array Returns an array with calculated data. |
||
464 | */ |
||
465 | public function cdl3whitesoldiers(array $open, array $high, array $low, array $close): array |
||
473 | |||
474 | /** |
||
475 | * Abandoned Baby. |
||
476 | * |
||
477 | * @param array $open Opening price, array of real values. |
||
478 | * @param array $high High price, array of real values. |
||
479 | * @param array $low Low price, array of real values. |
||
480 | * @param array $close Closing price, array of real values. |
||
481 | * @param float $penetration Percentage of penetration of a candle within another candle. |
||
482 | * |
||
483 | * @return array Returns an array with calculated data. |
||
484 | */ |
||
485 | public function cdlabandonedbaby( |
||
498 | |||
499 | /** |
||
500 | * Advance Block. |
||
501 | * |
||
502 | * @param array $open Opening price, array of real values. |
||
503 | * @param array $high High price, array of real values. |
||
504 | * @param array $low Low price, array of real values. |
||
505 | * @param array $close Closing price, array of real values. |
||
506 | * |
||
507 | * @return array Returns an array with calculated data. |
||
508 | */ |
||
509 | public function cdladvanceblock(array $open, array $high, array $low, array $close): array |
||
517 | |||
518 | /** |
||
519 | * Belt-hold. |
||
520 | * |
||
521 | * @param array $open Opening price, array of real values. |
||
522 | * @param array $high High price, array of real values. |
||
523 | * @param array $low Low price, array of real values. |
||
524 | * @param array $close Closing price, array of real values. |
||
525 | * |
||
526 | * @return array Returns an array with calculated data. |
||
527 | */ |
||
528 | public function cdlbelthold(array $open, array $high, array $low, array $close): array |
||
536 | |||
537 | /** |
||
538 | * Breakaway. |
||
539 | * |
||
540 | * @param array $open Opening price, array of real values. |
||
541 | * @param array $high High price, array of real values. |
||
542 | * @param array $low Low price, array of real values. |
||
543 | * @param array $close Closing price, array of real values. |
||
544 | * |
||
545 | * @return array Returns an array with calculated data. |
||
546 | */ |
||
547 | public function cdlbreakaway(array $open, array $high, array $low, array $close): array |
||
555 | |||
556 | /** |
||
557 | * Closing Marubozu. |
||
558 | * |
||
559 | * @param array $open Opening price, array of real values. |
||
560 | * @param array $high High price, array of real values. |
||
561 | * @param array $low Low price, array of real values. |
||
562 | * @param array $close Closing price, array of real values. |
||
563 | * |
||
564 | * @return array Returns an array with calculated data. |
||
565 | */ |
||
566 | public function cdlclosingmarubozu(array $open, array $high, array $low, array $close): array |
||
574 | |||
575 | /** |
||
576 | * Concealing Baby Swallow. |
||
577 | * |
||
578 | * @param array $open Opening price, array of real values. |
||
579 | * @param array $high High price, array of real values. |
||
580 | * @param array $low Low price, array of real values. |
||
581 | * @param array $close Closing price, array of real values. |
||
582 | * |
||
583 | * @return array Returns an array with calculated data. |
||
584 | */ |
||
585 | public function cdlconcealbabyswall(array $open, array $high, array $low, array $close): array |
||
593 | |||
594 | /** |
||
595 | * Counterattack. |
||
596 | * |
||
597 | * @param array $open Opening price, array of real values. |
||
598 | * @param array $high High price, array of real values. |
||
599 | * @param array $low Low price, array of real values. |
||
600 | * @param array $close Closing price, array of real values. |
||
601 | * |
||
602 | * @return array Returns an array with calculated data. |
||
603 | */ |
||
604 | public function cdlcounterattack(array $open, array $high, array $low, array $close): array |
||
612 | |||
613 | /** |
||
614 | * Dark Cloud Cover. |
||
615 | * |
||
616 | * @param array $open Opening price, array of real values. |
||
617 | * @param array $high High price, array of real values. |
||
618 | * @param array $low Low price, array of real values. |
||
619 | * @param array $close Closing price, array of real values. |
||
620 | * @param float $penetration Percentage of penetration of a candle within another candle. |
||
621 | * |
||
622 | * @return array Returns an array with calculated data. |
||
623 | */ |
||
624 | public function cdldarkcloudcover( |
||
637 | |||
638 | /** |
||
639 | * Doji. |
||
640 | * |
||
641 | * @param array $open Opening price, array of real values. |
||
642 | * @param array $high High price, array of real values. |
||
643 | * @param array $low Low price, array of real values. |
||
644 | * @param array $close Closing price, array of real values. |
||
645 | * |
||
646 | * @return array Returns an array with calculated data. |
||
647 | */ |
||
648 | public function cdldoji(array $open, array $high, array $low, array $close): array |
||
656 | |||
657 | /** |
||
658 | * Doji Star. |
||
659 | * |
||
660 | * @param array $open Opening price, array of real values. |
||
661 | * @param array $high High price, array of real values. |
||
662 | * @param array $low Low price, array of real values. |
||
663 | * @param array $close Closing price, array of real values. |
||
664 | * |
||
665 | * @return array Returns an array with calculated data. |
||
666 | */ |
||
667 | public function cdldojistar(array $open, array $high, array $low, array $close): array |
||
675 | |||
676 | /** |
||
677 | * Dragonfly Doji. |
||
678 | * |
||
679 | * @param array $open Opening price, array of real values. |
||
680 | * @param array $high High price, array of real values. |
||
681 | * @param array $low Low price, array of real values. |
||
682 | * @param array $close Closing price, array of real values. |
||
683 | * |
||
684 | * @return array Returns an array with calculated data. |
||
685 | */ |
||
686 | public function cdldragonflydoji(array $open, array $high, array $low, array $close): array |
||
694 | |||
695 | /** |
||
696 | * Engulfing Pattern. |
||
697 | * |
||
698 | * @param array $open Opening price, array of real values. |
||
699 | * @param array $high High price, array of real values. |
||
700 | * @param array $low Low price, array of real values. |
||
701 | * @param array $close Closing price, array of real values. |
||
702 | * |
||
703 | * @return array Returns an array with calculated data. |
||
704 | */ |
||
705 | public function cdlengulfing(array $open, array $high, array $low, array $close): array |
||
713 | |||
714 | /** |
||
715 | * Evening Doji Star. |
||
716 | * |
||
717 | * @param array $open Opening price, array of real values. |
||
718 | * @param array $high High price, array of real values. |
||
719 | * @param array $low Low price, array of real values. |
||
720 | * @param array $close Closing price, array of real values. |
||
721 | * @param float $penetration Percentage of penetration of a candle within another candle. |
||
722 | * |
||
723 | * @return array Returns an array with calculated data. |
||
724 | */ |
||
725 | public function cdleveningdojistar( |
||
738 | |||
739 | /** |
||
740 | * Evening Star. |
||
741 | * |
||
742 | * @param array $open Opening price, array of real values. |
||
743 | * @param array $high High price, array of real values. |
||
744 | * @param array $low Low price, array of real values. |
||
745 | * @param array $close Closing price, array of real values. |
||
746 | * @param float $penetration [OPTIONAL] [DEFAULT 0.3] Percentage of penetration of a candle within another candle. |
||
747 | * |
||
748 | * @return array Returns an array with calculated data. |
||
749 | */ |
||
750 | public function cdleveningstar( |
||
763 | |||
764 | /** |
||
765 | * Up/Down-gap side-by-side white lines. |
||
766 | * |
||
767 | * @param array $open Opening price, array of real values. |
||
768 | * @param array $high High price, array of real values. |
||
769 | * @param array $low Low price, array of real values. |
||
770 | * @param array $close Closing price, array of real values. |
||
771 | * |
||
772 | * @return array Returns an array with calculated data. |
||
773 | */ |
||
774 | public function cdlgapsidesidewhite(array $open, array $high, array $low, array $close): array |
||
782 | |||
783 | /** |
||
784 | * Gravestone Doji. |
||
785 | * |
||
786 | * @param array $open Opening price, array of real values. |
||
787 | * @param array $high High price, array of real values. |
||
788 | * @param array $low Low price, array of real values. |
||
789 | * @param array $close Closing price, array of real values. |
||
790 | * |
||
791 | * @return array Returns an array with calculated data. |
||
792 | */ |
||
793 | public function cdlgravestonedoji(array $open, array $high, array $low, array $close): array |
||
801 | |||
802 | /** |
||
803 | * Hammer. |
||
804 | * |
||
805 | * @param array $open Opening price, array of real values. |
||
806 | * @param array $high High price, array of real values. |
||
807 | * @param array $low Low price, array of real values. |
||
808 | * @param array $close Closing price, array of real values. |
||
809 | * |
||
810 | * @return array Returns an array with calculated data. |
||
811 | */ |
||
812 | public function cdlhammer(array $open, array $high, array $low, array $close): array |
||
820 | |||
821 | /** |
||
822 | * Hanging Man. |
||
823 | * |
||
824 | * @param array $open Opening price, array of real values. |
||
825 | * @param array $high High price, array of real values. |
||
826 | * @param array $low Low price, array of real values. |
||
827 | * @param array $close Closing price, array of real values. |
||
828 | * |
||
829 | * @return array Returns an array with calculated data. |
||
830 | */ |
||
831 | public function cdlhangingman(array $open, array $high, array $low, array $close): array |
||
839 | |||
840 | /** |
||
841 | * Harami Pattern. |
||
842 | * |
||
843 | * @param array $open Opening price, array of real values. |
||
844 | * @param array $high High price, array of real values. |
||
845 | * @param array $low Low price, array of real values. |
||
846 | * @param array $close Closing price, array of real values. |
||
847 | * |
||
848 | * @return array Returns an array with calculated data. |
||
849 | */ |
||
850 | public function cdlharami(array $open, array $high, array $low, array $close): array |
||
858 | |||
859 | /** |
||
860 | * Harami Cross Pattern. |
||
861 | * |
||
862 | * @param array $open Opening price, array of real values. |
||
863 | * @param array $high High price, array of real values. |
||
864 | * @param array $low Low price, array of real values. |
||
865 | * @param array $close Closing price, array of real values. |
||
866 | * |
||
867 | * @return array Returns an array with calculated data. |
||
868 | */ |
||
869 | public function cdlharamicross(array $open, array $high, array $low, array $close): array |
||
877 | |||
878 | /** |
||
879 | * High-Wave Candle. |
||
880 | * |
||
881 | * @param array $open Opening price, array of real values. |
||
882 | * @param array $high High price, array of real values. |
||
883 | * @param array $low Low price, array of real values. |
||
884 | * @param array $close Closing price, array of real values. |
||
885 | * |
||
886 | * @return array Returns an array with calculated data. |
||
887 | */ |
||
888 | public function cdlhighwave(array $open, array $high, array $low, array $close): array |
||
896 | |||
897 | /** |
||
898 | * Hikkake Pattern. |
||
899 | * |
||
900 | * @param array $open Opening price, array of real values. |
||
901 | * @param array $high High price, array of real values. |
||
902 | * @param array $low Low price, array of real values. |
||
903 | * @param array $close Closing price, array of real values. |
||
904 | * |
||
905 | * @return array Returns an array with calculated data. |
||
906 | */ |
||
907 | public function cdlhikkake(array $open, array $high, array $low, array $close): array |
||
915 | |||
916 | /** |
||
917 | * Modified Hikkake Pattern. |
||
918 | * |
||
919 | * @param array $open Opening price, array of real values. |
||
920 | * @param array $high High price, array of real values. |
||
921 | * @param array $low Low price, array of real values. |
||
922 | * @param array $close Closing price, array of real values. |
||
923 | * |
||
924 | * @return array Returns an array with calculated data. |
||
925 | */ |
||
926 | public function cdlhikkakemod(array $open, array $high, array $low, array $close): array |
||
934 | |||
935 | /** |
||
936 | * Homing Pigeon. |
||
937 | * |
||
938 | * @param array $open Opening price, array of real values. |
||
939 | * @param array $high High price, array of real values. |
||
940 | * @param array $low Low price, array of real values. |
||
941 | * @param array $close Closing price, array of real values. |
||
942 | * |
||
943 | * @return array Returns an array with calculated data. |
||
944 | */ |
||
945 | public function cdlhomingpigeon(array $open, array $high, array $low, array $close): array |
||
953 | |||
954 | /** |
||
955 | * Identical Three Crows. |
||
956 | * |
||
957 | * @param array $open Opening price, array of real values. |
||
958 | * @param array $high High price, array of real values. |
||
959 | * @param array $low Low price, array of real values. |
||
960 | * @param array $close Closing price, array of real values. |
||
961 | * |
||
962 | * @return array Returns an array with calculated data. |
||
963 | */ |
||
964 | public function cdlidentical3crows(array $open, array $high, array $low, array $close): array |
||
972 | |||
973 | /** |
||
974 | * In-Neck Pattern. |
||
975 | * |
||
976 | * @param array $open Opening price, array of real values. |
||
977 | * @param array $high High price, array of real values. |
||
978 | * @param array $low Low price, array of real values. |
||
979 | * @param array $close Closing price, array of real values. |
||
980 | * |
||
981 | * @return array Returns an array with calculated data. |
||
982 | */ |
||
983 | public function cdlinneck(array $open, array $high, array $low, array $close): array |
||
991 | |||
992 | /** |
||
993 | * Inverted Hammer. |
||
994 | * |
||
995 | * @param array $open Opening price, array of real values. |
||
996 | * @param array $high High price, array of real values. |
||
997 | * @param array $low Low price, array of real values. |
||
998 | * @param array $close Closing price, array of real values. |
||
999 | * |
||
1000 | * @return array Returns an array with calculated data. |
||
1001 | */ |
||
1002 | public function cdlinvertedhammer(array $open, array $high, array $low, array $close): array |
||
1010 | |||
1011 | /** |
||
1012 | * Kicking. |
||
1013 | * |
||
1014 | * @param array $open Opening price, array of real values. |
||
1015 | * @param array $high High price, array of real values. |
||
1016 | * @param array $low Low price, array of real values. |
||
1017 | * @param array $close Closing price, array of real values. |
||
1018 | * |
||
1019 | * @return array Returns an array with calculated data. |
||
1020 | */ |
||
1021 | public function cdlkicking(array $open, array $high, array $low, array $close): array |
||
1029 | |||
1030 | /** |
||
1031 | * Kicking - bull/bear determined by the longer marubozu. |
||
1032 | * |
||
1033 | * @param array $open Opening price, array of real values. |
||
1034 | * @param array $high High price, array of real values. |
||
1035 | * @param array $low Low price, array of real values. |
||
1036 | * @param array $close Closing price, array of real values. |
||
1037 | * |
||
1038 | * @return array Returns an array with calculated data. |
||
1039 | */ |
||
1040 | public function cdlkickingbylength(array $open, array $high, array $low, array $close): array |
||
1048 | |||
1049 | /** |
||
1050 | * Ladder Bottom. |
||
1051 | * |
||
1052 | * @param array $open Opening price, array of real values. |
||
1053 | * @param array $high High price, array of real values. |
||
1054 | * @param array $low Low price, array of real values. |
||
1055 | * @param array $close Closing price, array of real values. |
||
1056 | * |
||
1057 | * @return array Returns an array with calculated data. |
||
1058 | */ |
||
1059 | public function cdlladderbottom(array $open, array $high, array $low, array $close): array |
||
1067 | |||
1068 | /** |
||
1069 | * Long Legged Doji. |
||
1070 | * |
||
1071 | * @param array $open Opening price, array of real values. |
||
1072 | * @param array $high High price, array of real values. |
||
1073 | * @param array $low Low price, array of real values. |
||
1074 | * @param array $close Closing price, array of real values. |
||
1075 | * |
||
1076 | * @return array Returns an array with calculated data. |
||
1077 | */ |
||
1078 | public function cdllongleggeddoji(array $open, array $high, array $low, array $close): array |
||
1086 | |||
1087 | /** |
||
1088 | * Long Line Candle. |
||
1089 | * |
||
1090 | * @param array $open Opening price, array of real values. |
||
1091 | * @param array $high High price, array of real values. |
||
1092 | * @param array $low Low price, array of real values. |
||
1093 | * @param array $close Closing price, array of real values. |
||
1094 | * |
||
1095 | * @return array Returns an array with calculated data. |
||
1096 | */ |
||
1097 | public function cdllongline(array $open, array $high, array $low, array $close): array |
||
1105 | |||
1106 | /** |
||
1107 | * Marubozu. |
||
1108 | * |
||
1109 | * @param array $open Opening price, array of real values. |
||
1110 | * @param array $high High price, array of real values. |
||
1111 | * @param array $low Low price, array of real values. |
||
1112 | * @param array $close Closing price, array of real values. |
||
1113 | * |
||
1114 | * @return array Returns an array with calculated data. |
||
1115 | */ |
||
1116 | public function cdlmarubozu(array $open, array $high, array $low, array $close): array |
||
1124 | |||
1125 | /** |
||
1126 | * Matching Low. |
||
1127 | * |
||
1128 | * @param array $open Opening price, array of real values. |
||
1129 | * @param array $high High price, array of real values. |
||
1130 | * @param array $low Low price, array of real values. |
||
1131 | * @param array $close Closing price, array of real values. |
||
1132 | * |
||
1133 | * @return array Returns an array with calculated data. |
||
1134 | */ |
||
1135 | public function cdlmatchinglow(array $open, array $high, array $low, array $close): array |
||
1143 | |||
1144 | /** |
||
1145 | * Mat Hold. |
||
1146 | * |
||
1147 | * @param array $open Opening price, array of real values. |
||
1148 | * @param array $high High price, array of real values. |
||
1149 | * @param array $low Low price, array of real values. |
||
1150 | * @param array $close Closing price, array of real values. |
||
1151 | * @param float $penetration Percentage of penetration of a candle within another candle. |
||
1152 | * |
||
1153 | * @return array Returns an array with calculated data. |
||
1154 | */ |
||
1155 | public function cdlmathold( |
||
1168 | |||
1169 | /** |
||
1170 | * Morning Doji Star. |
||
1171 | * |
||
1172 | * @param array $open Opening price, array of real values. |
||
1173 | * @param array $high High price, array of real values. |
||
1174 | * @param array $low Low price, array of real values. |
||
1175 | * @param array $close Closing price, array of real values. |
||
1176 | * @param float $penetration [OPTIONAL] [DEFAULT 0.3] Percentage of penetration of a candle within another candle. |
||
1177 | * |
||
1178 | * @return array Returns an array with calculated data. |
||
1179 | */ |
||
1180 | public function cdlmorningdojistar( |
||
1193 | |||
1194 | /** |
||
1195 | * Morning Star. |
||
1196 | * |
||
1197 | * @param array $open Opening price, array of real values. |
||
1198 | * @param array $high High price, array of real values. |
||
1199 | * @param array $low Low price, array of real values. |
||
1200 | * @param array $close Closing price, array of real values. |
||
1201 | * @param float $penetration Percentage of penetration of a candle within another candle. |
||
1202 | * |
||
1203 | * @return array Returns an array with calculated data. |
||
1204 | */ |
||
1205 | public function cdlmorningstar( |
||
1218 | |||
1219 | /** |
||
1220 | * On-Neck Pattern. |
||
1221 | * |
||
1222 | * @param array $open Opening price, array of real values. |
||
1223 | * @param array $high High price, array of real values. |
||
1224 | * @param array $low Low price, array of real values. |
||
1225 | * @param array $close Closing price, array of real values. |
||
1226 | * |
||
1227 | * @return array Returns an array with calculated data. |
||
1228 | */ |
||
1229 | public function cdlonneck(array $open, array $high, array $low, array $close): array |
||
1237 | |||
1238 | /** |
||
1239 | * Piercing Pattern. |
||
1240 | * |
||
1241 | * @param array $open Opening price, array of real values. |
||
1242 | * @param array $high High price, array of real values. |
||
1243 | * @param array $low Low price, array of real values. |
||
1244 | * @param array $close Closing price, array of real values. |
||
1245 | * |
||
1246 | * @return array Returns an array with calculated data. |
||
1247 | */ |
||
1248 | public function cdlpiercing(array $open, array $high, array $low, array $close): array |
||
1256 | |||
1257 | /** |
||
1258 | * Rickshaw Man. |
||
1259 | * |
||
1260 | * @param array $open Opening price, array of real values. |
||
1261 | * @param array $high High price, array of real values. |
||
1262 | * @param array $low Low price, array of real values. |
||
1263 | * @param array $close Closing price, array of real values. |
||
1264 | * |
||
1265 | * @return array Returns an array with calculated data. |
||
1266 | */ |
||
1267 | public function cdlrickshawman(array $open, array $high, array $low, array $close): array |
||
1275 | |||
1276 | /** |
||
1277 | * Rising/Falling Three Methods. |
||
1278 | * |
||
1279 | * @param array $open Opening price, array of real values. |
||
1280 | * @param array $high High price, array of real values. |
||
1281 | * @param array $low Low price, array of real values. |
||
1282 | * @param array $close Closing price, array of real values. |
||
1283 | * |
||
1284 | * @return array Returns an array with calculated data. |
||
1285 | */ |
||
1286 | public function cdlrisefall3methods(array $open, array $high, array $low, array $close): array |
||
1294 | |||
1295 | /** |
||
1296 | * Separating Lines. |
||
1297 | * |
||
1298 | * @param array $open Opening price, array of real values. |
||
1299 | * @param array $high High price, array of real values. |
||
1300 | * @param array $low Low price, array of real values. |
||
1301 | * @param array $close Closing price, array of real values. |
||
1302 | * |
||
1303 | * @return array Returns an array with calculated data. |
||
1304 | */ |
||
1305 | public function cdlseparatinglines(array $open, array $high, array $low, array $close): array |
||
1313 | |||
1314 | /** |
||
1315 | * Shooting Star. |
||
1316 | * |
||
1317 | * @param array $open Opening price, array of real values. |
||
1318 | * @param array $high High price, array of real values. |
||
1319 | * @param array $low Low price, array of real values. |
||
1320 | * @param array $close Closing price, array of real values. |
||
1321 | * |
||
1322 | * @return array Returns an array with calculated data. |
||
1323 | */ |
||
1324 | public function cdlshootingstar(array $open, array $high, array $low, array $close): array |
||
1332 | |||
1333 | /** |
||
1334 | * Short Line Candle. |
||
1335 | * |
||
1336 | * @param array $open Opening price, array of real values. |
||
1337 | * @param array $high High price, array of real values. |
||
1338 | * @param array $low Low price, array of real values. |
||
1339 | * @param array $close Closing price, array of real values. |
||
1340 | * |
||
1341 | * @return array Returns an array with calculated data. |
||
1342 | */ |
||
1343 | public function cdlshortline(array $open, array $high, array $low, array $close): array |
||
1351 | |||
1352 | /** |
||
1353 | * Spinning Top. |
||
1354 | * |
||
1355 | * @param array $open Opening price, array of real values. |
||
1356 | * @param array $high High price, array of real values. |
||
1357 | * @param array $low Low price, array of real values. |
||
1358 | * @param array $close Closing price, array of real values. |
||
1359 | * |
||
1360 | * @return array Returns an array with calculated data. |
||
1361 | */ |
||
1362 | public function cdlspinningtop(array $open, array $high, array $low, array $close): array |
||
1370 | |||
1371 | /** |
||
1372 | * Stalled Pattern. |
||
1373 | * |
||
1374 | * @param array $open Opening price, array of real values. |
||
1375 | * @param array $high High price, array of real values. |
||
1376 | * @param array $low Low price, array of real values. |
||
1377 | * @param array $close Closing price, array of real values. |
||
1378 | * |
||
1379 | * @return array Returns an array with calculated data. |
||
1380 | */ |
||
1381 | public function cdlstalledpattern(array $open, array $high, array $low, array $close): array |
||
1389 | |||
1390 | /** |
||
1391 | * Stick Sandwich. |
||
1392 | * |
||
1393 | * @param array $open Opening price, array of real values. |
||
1394 | * @param array $high High price, array of real values. |
||
1395 | * @param array $low Low price, array of real values. |
||
1396 | * @param array $close Closing price, array of real values. |
||
1397 | * |
||
1398 | * @return array Returns an array with calculated data. |
||
1399 | */ |
||
1400 | public function cdlsticksandwich(array $open, array $high, array $low, array $close): array |
||
1408 | |||
1409 | /** |
||
1410 | * Takuri (Dragonfly Doji with very long lower shadow). |
||
1411 | * |
||
1412 | * @param array $open Opening price, array of real values. |
||
1413 | * @param array $high High price, array of real values. |
||
1414 | * @param array $low Low price, array of real values. |
||
1415 | * @param array $close Closing price, array of real values. |
||
1416 | * |
||
1417 | * @return array Returns an array with calculated data. |
||
1418 | */ |
||
1419 | public function cdltakuri(array $open, array $high, array $low, array $close): array |
||
1427 | |||
1428 | /** |
||
1429 | * Tasuki Gap. |
||
1430 | * |
||
1431 | * @param array $open Opening price, array of real values. |
||
1432 | * @param array $high High price, array of real values. |
||
1433 | * @param array $low Low price, array of real values. |
||
1434 | * @param array $close Closing price, array of real values. |
||
1435 | * |
||
1436 | * @return array Returns an array with calculated data. |
||
1437 | */ |
||
1438 | public function cdltasukigap(array $open, array $high, array $low, array $close): array |
||
1446 | |||
1447 | /** |
||
1448 | * Thrusting Pattern. |
||
1449 | * |
||
1450 | * @param array $open Opening price, array of real values. |
||
1451 | * @param array $high High price, array of real values. |
||
1452 | * @param array $low Low price, array of real values. |
||
1453 | * @param array $close Closing price, array of real values. |
||
1454 | * |
||
1455 | * @return array Returns an array with calculated data. |
||
1456 | */ |
||
1457 | public function cdlthrusting(array $open, array $high, array $low, array $close): array |
||
1465 | |||
1466 | /** |
||
1467 | * Tristar Pattern. |
||
1468 | * |
||
1469 | * @param array $open Opening price, array of real values. |
||
1470 | * @param array $high High price, array of real values. |
||
1471 | * @param array $low Low price, array of real values. |
||
1472 | * @param array $close Closing price, array of real values. |
||
1473 | * |
||
1474 | * @return array Returns an array with calculated data. |
||
1475 | */ |
||
1476 | public function cdltristar(array $open, array $high, array $low, array $close): array |
||
1484 | |||
1485 | /** |
||
1486 | * Unique 3 River. |
||
1487 | * |
||
1488 | * @param array $open Opening price, array of real values. |
||
1489 | * @param array $high High price, array of real values. |
||
1490 | * @param array $low Low price, array of real values. |
||
1491 | * @param array $close Closing price, array of real values. |
||
1492 | * |
||
1493 | * @return array Returns an array with calculated data. |
||
1494 | */ |
||
1495 | public function cdlunique3river(array $open, array $high, array $low, array $close): array |
||
1503 | |||
1504 | /** |
||
1505 | * Upside Gap Two Crows. |
||
1506 | * |
||
1507 | * @param array $open Opening price, array of real values. |
||
1508 | * @param array $high High price, array of real values. |
||
1509 | * @param array $low Low price, array of real values. |
||
1510 | * @param array $close Closing price, array of real values. |
||
1511 | * |
||
1512 | * @return array Returns an array with calculated data. |
||
1513 | */ |
||
1514 | public function cdlupsidegap2crows(array $open, array $high, array $low, array $close): array |
||
1522 | |||
1523 | /** |
||
1524 | * Upside/Downside Gap Three Methods. |
||
1525 | * |
||
1526 | * @param array $open Opening price, array of real values. |
||
1527 | * @param array $high High price, array of real values. |
||
1528 | * @param array $low Low price, array of real values. |
||
1529 | * @param array $close Closing price, array of real values. |
||
1530 | * |
||
1531 | * @return array Returns an array with calculated data. |
||
1532 | */ |
||
1533 | public function cdlxsidegap3methods(array $open, array $high, array $low, array $close): array |
||
1541 | |||
1542 | /** |
||
1543 | * Vector Ceil. |
||
1544 | * |
||
1545 | * Calculates the next highest integer for each value in real and returns the resulting array. |
||
1546 | * |
||
1547 | * @param array $real Array of real values. |
||
1548 | * |
||
1549 | * @return array Returns an array with calculated data. |
||
1550 | */ |
||
1551 | public function ceil(array $real): array |
||
1559 | |||
1560 | /** |
||
1561 | * Chande Momentum Oscillator. |
||
1562 | * |
||
1563 | * @param array $real Array of real values. |
||
1564 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1565 | * |
||
1566 | * @return array Returns an array with calculated data. |
||
1567 | */ |
||
1568 | public function cmo(array $real, int $timePeriod = 14): array |
||
1576 | |||
1577 | /** |
||
1578 | * Pearson's Correlation Coefficient (r). |
||
1579 | * |
||
1580 | * @param array $real0 Array of real values. |
||
1581 | * @param array $real1 Array of real values. |
||
1582 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1583 | * |
||
1584 | * @return array Returns an array with calculated data. |
||
1585 | */ |
||
1586 | public function correl(array $real0, array $real1, int $timePeriod = 30): array |
||
1594 | |||
1595 | /** |
||
1596 | * Vector Trigonometric Cos. |
||
1597 | * |
||
1598 | * Calculates the cosine for each value in real and returns the resulting array. |
||
1599 | * |
||
1600 | * @param array $real Array of real values. |
||
1601 | * |
||
1602 | * @return array Returns an array with calculated data. |
||
1603 | */ |
||
1604 | public function cos(array $real): array |
||
1612 | |||
1613 | /** |
||
1614 | * Vector Trigonometric Cosh. |
||
1615 | * |
||
1616 | * Calculates the hyperbolic cosine for each value in real and returns the resulting array. |
||
1617 | * |
||
1618 | * @param array $real Array of real values. |
||
1619 | * |
||
1620 | * @return array Returns an array with calculated data. |
||
1621 | */ |
||
1622 | public function cosh(array $real): array |
||
1630 | |||
1631 | /** |
||
1632 | * Double Exponential Moving Average. |
||
1633 | * |
||
1634 | * @param array $real Array of real values. |
||
1635 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1636 | * |
||
1637 | * @return array Returns an array with calculated data. |
||
1638 | */ |
||
1639 | public function dema(array $real, int $timePeriod = 30): array |
||
1647 | |||
1648 | /** |
||
1649 | * Vector Arithmetic Div. |
||
1650 | * |
||
1651 | * Divides each value from real0 by the corresponding value from real1 and returns the resulting array. |
||
1652 | * |
||
1653 | * @param array $real0 Array of real values. |
||
1654 | * @param array $real1 Array of real values. |
||
1655 | * |
||
1656 | * @return array Returns an array with calculated data. |
||
1657 | */ |
||
1658 | public function div(array $real0, array $real1): array |
||
1666 | |||
1667 | /** |
||
1668 | * Directional Movement Index. |
||
1669 | * |
||
1670 | * @param array $high High price, array of real values. |
||
1671 | * @param array $low Low price, array of real values. |
||
1672 | * @param array $close Closing price, array of real values. |
||
1673 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1674 | * |
||
1675 | * @return array Returns an array with calculated data. |
||
1676 | */ |
||
1677 | public function dx(array $high, array $low, array $close, int $timePeriod = 14): array |
||
1685 | |||
1686 | /** |
||
1687 | * Exponential Moving Average. |
||
1688 | * |
||
1689 | * @param array $real Array of real values. |
||
1690 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1691 | * |
||
1692 | * @return array Returns an array with calculated data. |
||
1693 | */ |
||
1694 | public function ema(array $real, int $timePeriod = 30): array |
||
1702 | |||
1703 | /** |
||
1704 | * Get error code. |
||
1705 | * |
||
1706 | * Get error code of the last operation. |
||
1707 | * |
||
1708 | * @return int Returns the error code identified by one of the ERR_* constants. |
||
1709 | */ |
||
1710 | public function errno(): int |
||
1714 | |||
1715 | /** |
||
1716 | * Vector Arithmetic Exp. |
||
1717 | * |
||
1718 | * Calculates e raised to the power of each value in real. Returns an array with the calculated data. |
||
1719 | * |
||
1720 | * @param array $real Array of real values. |
||
1721 | * |
||
1722 | * @return array Returns an array with calculated data. |
||
1723 | */ |
||
1724 | public function exp(array $real): array |
||
1732 | |||
1733 | /** |
||
1734 | * Vector Floor. |
||
1735 | * |
||
1736 | * Calculates the next lowest integer for each value in real and returns the resulting array. |
||
1737 | * |
||
1738 | * @param array $real Array of real values. |
||
1739 | * |
||
1740 | * @return array Returns an array with calculated data. |
||
1741 | */ |
||
1742 | public function floor(array $real): array |
||
1750 | |||
1751 | /** |
||
1752 | * Get compatibility mode. |
||
1753 | * |
||
1754 | * Get compatibility mode which affects the way calculations are done by all the extension functions. |
||
1755 | * |
||
1756 | * @return int Returns the compatibility mode id which can be identified by COMPATIBILITY_* series of constants. |
||
1757 | */ |
||
1758 | public function get_compat(): int |
||
1762 | |||
1763 | /** |
||
1764 | * Get unstable period. |
||
1765 | * |
||
1766 | * Get unstable period factor for a particular function. |
||
1767 | * |
||
1768 | * @param int $functionId Function ID the factor to be read for. FUNC_UNST_* series of constants should be used. |
||
1769 | * |
||
1770 | * @return int Returns the unstable period factor for the corresponding function. |
||
1771 | */ |
||
1772 | public function get_unstable_period(int $functionId): int |
||
1776 | |||
1777 | /** |
||
1778 | * Hilbert Transform - Dominant Cycle Period. |
||
1779 | * |
||
1780 | * @param array $real Array of real values. |
||
1781 | * |
||
1782 | * @return array Returns an array with calculated data. |
||
1783 | */ |
||
1784 | public function ht_dcperiod(array $real): array |
||
1792 | |||
1793 | /** |
||
1794 | * Hilbert Transform - Dominant Cycle Phase. |
||
1795 | * |
||
1796 | * @param array $real Array of real values. |
||
1797 | * |
||
1798 | * @return array Returns an array with calculated data. |
||
1799 | */ |
||
1800 | public function ht_dcphase(array $real): array |
||
1808 | |||
1809 | /** |
||
1810 | * Hilbert Transform - Phasor Components. |
||
1811 | * |
||
1812 | * @param array $open Opening price, array of real values. |
||
1813 | * @param array $close Closing price, array of real values. |
||
1814 | * |
||
1815 | * @return array Returns an array with calculated data. |
||
1816 | */ |
||
1817 | public function ht_phasor(array $open, array $close): array |
||
1825 | |||
1826 | /** |
||
1827 | * Hilbert Transform - Phasor Components. |
||
1828 | * |
||
1829 | * @param array $open Opening price, array of real values. |
||
1830 | * @param array $close Closing price, array of real values. |
||
1831 | * |
||
1832 | * @return array Returns an array with calculated data. |
||
1833 | */ |
||
1834 | public function ht_sine(array $open, array $close): array |
||
1842 | |||
1843 | /** |
||
1844 | * Hilbert Transform - Instantaneous Trendline. |
||
1845 | * |
||
1846 | * @param array $real Array of real values. |
||
1847 | * |
||
1848 | * @return array Returns an array with calculated data. |
||
1849 | */ |
||
1850 | public function ht_trendline(array $real): array |
||
1858 | |||
1859 | /** |
||
1860 | * Hilbert Transform - Trend vs Cycle Mode. |
||
1861 | * |
||
1862 | * @param array $real Array of real values. |
||
1863 | * |
||
1864 | * @return array Returns an array with calculated data. |
||
1865 | */ |
||
1866 | public function ht_trendmode(array $real): array |
||
1874 | |||
1875 | /** |
||
1876 | * Kaufman Adaptive Moving Average. |
||
1877 | * |
||
1878 | * @param array $real Array of real values. |
||
1879 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1880 | * |
||
1881 | * @return array Returns an array with calculated data. |
||
1882 | */ |
||
1883 | public function kama(array $real, int $timePeriod = 30): array |
||
1891 | |||
1892 | /** |
||
1893 | * Linear Regression Angle. |
||
1894 | * |
||
1895 | * @param array $real Array of real values. |
||
1896 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1897 | * |
||
1898 | * @return array Returns an array with calculated data. |
||
1899 | */ |
||
1900 | public function linearreg_angle(array $real, int $timePeriod = 14): array |
||
1908 | |||
1909 | /** |
||
1910 | * Linear Regression Angle. |
||
1911 | * |
||
1912 | * @param array $real Array of real values. |
||
1913 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1914 | * |
||
1915 | * @return array Returns an array with calculated data. |
||
1916 | */ |
||
1917 | public function linearreg_intercept(array $real, int $timePeriod = 14): array |
||
1925 | |||
1926 | /** |
||
1927 | * Linear Regression Slope. |
||
1928 | * |
||
1929 | * @param array $real Array of real values. |
||
1930 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1931 | * |
||
1932 | * @return array Returns an array with calculated data. |
||
1933 | */ |
||
1934 | public function linearreg_slope(array $real, int $timePeriod = 14): array |
||
1942 | |||
1943 | /** |
||
1944 | * Linear Regression. |
||
1945 | * |
||
1946 | * @param array $real Array of real values. |
||
1947 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
1948 | * |
||
1949 | * @return array Returns an array with calculated data. |
||
1950 | */ |
||
1951 | public function linearreg(array $real, int $timePeriod = 14): array |
||
1959 | |||
1960 | /** |
||
1961 | * Vector Log Natural. |
||
1962 | * |
||
1963 | * Calculates the natural logarithm for each value in real and returns the resulting array. |
||
1964 | * |
||
1965 | * @param array $real Array of real values. |
||
1966 | * |
||
1967 | * @return array Returns an array with calculated data. |
||
1968 | */ |
||
1969 | public function ln(array $real): array |
||
1977 | |||
1978 | /** |
||
1979 | * Vector Log10. |
||
1980 | * |
||
1981 | * Calculates the base-10 logarithm for each value in real and returns the resulting array. |
||
1982 | * |
||
1983 | * @param array $real Array of real values. |
||
1984 | * |
||
1985 | * @return array Returns an array with calculated data. |
||
1986 | */ |
||
1987 | public function log10(array $real): array |
||
1995 | |||
1996 | /** |
||
1997 | * Moving average. |
||
1998 | * |
||
1999 | * @param array $real Array of real values. |
||
2000 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2001 | * @param int $mAType Type of Moving Average. MA_TYPE_* series of constants should be used. |
||
2002 | * |
||
2003 | * @return array Returns an array with calculated data. |
||
2004 | */ |
||
2005 | public function ma(array $real, int $timePeriod = 30, int $mAType = 0): array |
||
2013 | |||
2014 | /** |
||
2015 | * Moving Average Convergence/Divergence. |
||
2016 | * |
||
2017 | * @param array $real Array of real values. |
||
2018 | * @param int $fastPeriod Number of period for the fast MA. Valid range from 2 to 100000. |
||
2019 | * @param int $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000. |
||
2020 | * @param int $signalPeriod Smoothing for the signal line (nb of period). Valid range from 1 to 100000. |
||
2021 | * |
||
2022 | * @return array Returns an array with calculated data. |
||
2023 | */ |
||
2024 | public function macd( |
||
2036 | |||
2037 | /** |
||
2038 | * Moving Average Convergence/Divergence with controllable Moving Average type. |
||
2039 | * |
||
2040 | * @param array $real Array of real values. |
||
2041 | * @param int $fastPeriod Number of period for the fast MA. Valid range from 2 to 100000. |
||
2042 | * @param int $fastMAType Type of Moving Average for fast MA. MA_TYPE_* series of constants should be used. |
||
2043 | * @param int $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000. |
||
2044 | * @param int $slowMAType Type of Moving Average for fast MA. MA_TYPE_* series of constants should be used. |
||
2045 | * @param int $signalPeriod Smoothing for the signal line (nb of period). Valid range from 1 to 100000. |
||
2046 | * |
||
2047 | * @return array Returns an array with calculated data. |
||
2048 | */ |
||
2049 | public function macdext( |
||
2063 | |||
2064 | /** |
||
2065 | * Moving Average Convergence/Divergence Fix 12/26. |
||
2066 | * |
||
2067 | * @param array $real Array of real values. |
||
2068 | * @param int $signalPeriod Smoothing for the signal line (nb of period). Valid range from 1 to 100000. |
||
2069 | * |
||
2070 | * @return array Returns an array with calculated data. |
||
2071 | */ |
||
2072 | public function macdfix(array $real, int $signalPeriod = 9): array |
||
2080 | |||
2081 | /** |
||
2082 | * MESA Adaptive Moving Average. |
||
2083 | * |
||
2084 | * @param array $real Array of real values. |
||
2085 | * @param float $fastLimit Upper limit use in the adaptive algorithm. Valid range from 0.01 to 0.99. |
||
2086 | * @param float $slowLimit Lower limit use in the adaptive algorithm. Valid range from 0.01 to 0.99. |
||
2087 | * |
||
2088 | * @return array Returns an array with calculated data. |
||
2089 | */ |
||
2090 | public function mama(array $real, float $fastLimit = 0.5, float $slowLimit = 0.05): array |
||
2098 | |||
2099 | /** |
||
2100 | * Moving average with variable period |
||
2101 | * |
||
2102 | * @param array $real Array of real values. |
||
2103 | * @param array $periods Array of real values. |
||
2104 | * @param int $minPeriod Value less than minimum will be changed to Minimum period. Valid range from 2 to 100000 |
||
2105 | * @param int $maxPeriod Value higher than maximum will be changed to Maximum period. Valid range from 2 to 100000 |
||
2106 | * @param int $mAType Type of Moving Average. MA_TYPE_* series of constants should be used. |
||
2107 | * |
||
2108 | * @return array Returns an array with calculated data. |
||
2109 | */ |
||
2110 | public function mavp( |
||
2123 | |||
2124 | /** |
||
2125 | * Highest value over a specified period. |
||
2126 | * |
||
2127 | * @param array $real Array of real values. |
||
2128 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2129 | * |
||
2130 | * @return array Returns an array with calculated data. |
||
2131 | */ |
||
2132 | public function max(array $real, int $timePeriod = 30): array |
||
2140 | |||
2141 | /** |
||
2142 | * Index of highest value over a specified period |
||
2143 | * |
||
2144 | * @param array $real Array of real values. |
||
2145 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2146 | * |
||
2147 | * @return array Returns an array with calculated data. |
||
2148 | */ |
||
2149 | public function maxindex(array $real, int $timePeriod = 30): array |
||
2157 | |||
2158 | /** |
||
2159 | * Median Price. |
||
2160 | * |
||
2161 | * @param array $high High price, array of real values. |
||
2162 | * @param array $low Low price, array of real values. |
||
2163 | * |
||
2164 | * @return array Returns an array with calculated data. |
||
2165 | */ |
||
2166 | public function medprice(array $high, array $low): array |
||
2174 | |||
2175 | /** |
||
2176 | * Money Flow Index. |
||
2177 | * |
||
2178 | * @param array $high High price, array of real values. |
||
2179 | * @param array $low Low price, array of real values. |
||
2180 | * @param array $close Closing price, array of real values. |
||
2181 | * @param array $volume Volume traded, array of real values. |
||
2182 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2183 | * |
||
2184 | * @return array Returns an array with calculated data. |
||
2185 | */ |
||
2186 | public function mfi(array $high, array $low, array $close, array $volume, int $timePeriod = 14): array |
||
2194 | |||
2195 | /** |
||
2196 | * MidPoint over period. |
||
2197 | * |
||
2198 | * @param array $real Array of real values. |
||
2199 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2200 | * |
||
2201 | * @return array Returns an array with calculated data. |
||
2202 | */ |
||
2203 | public function midpoint(array $real, int $timePeriod = 14): array |
||
2211 | |||
2212 | /** |
||
2213 | * Midpoint Price over period. |
||
2214 | * |
||
2215 | * @param array $high High price, array of real values. |
||
2216 | * @param array $low Low price, array of real values. |
||
2217 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2218 | * |
||
2219 | * @return array Returns an array with calculated data. |
||
2220 | */ |
||
2221 | public function midprice(array $high, array $low, int $timePeriod = 14) |
||
2229 | |||
2230 | /** |
||
2231 | * Lowest value over a specified period. |
||
2232 | * |
||
2233 | * @param array $real Array of real values. |
||
2234 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2235 | * |
||
2236 | * @return array Returns an array with calculated data. |
||
2237 | */ |
||
2238 | public function min(array $real, int $timePeriod = 30): array |
||
2246 | |||
2247 | /** |
||
2248 | * Index of lowest value over a specified period. |
||
2249 | * |
||
2250 | * @param array $real Array of real values. |
||
2251 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2252 | * |
||
2253 | * @return array Returns an array with calculated data. |
||
2254 | */ |
||
2255 | public function minindex(array $real, int $timePeriod = 30): array |
||
2263 | |||
2264 | /** |
||
2265 | * Lowest and highest values over a specified period. |
||
2266 | * |
||
2267 | * @param array $real Array of real values. |
||
2268 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2269 | * |
||
2270 | * @return array Returns an array with calculated data. |
||
2271 | */ |
||
2272 | public function minmax(array $real, int $timePeriod = 30): array |
||
2280 | |||
2281 | /** |
||
2282 | * Indexes of lowest and highest values over a specified period. |
||
2283 | * |
||
2284 | * @param array $real Array of real values. |
||
2285 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2286 | * |
||
2287 | * @return array Returns an array with calculated data. |
||
2288 | */ |
||
2289 | public function minmaxindex(array $real, int $timePeriod = 30): array |
||
2297 | |||
2298 | /** |
||
2299 | * Minus Directional Indicator. |
||
2300 | * |
||
2301 | * @param array $high High price, array of real values. |
||
2302 | * @param array $low Low price, array of real values. |
||
2303 | * @param array $close Closing price, array of real values. |
||
2304 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2305 | * |
||
2306 | * @return array Returns an array with calculated data. |
||
2307 | */ |
||
2308 | public function minus_di(array $high, array $low, array $close, int $timePeriod = 14): array |
||
2316 | |||
2317 | /** |
||
2318 | * Minus Directional Movement. |
||
2319 | * |
||
2320 | * @param array $high High price, array of real values. |
||
2321 | * @param array $low Low price, array of real values. |
||
2322 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2323 | * |
||
2324 | * @return array Returns an array with calculated data. |
||
2325 | */ |
||
2326 | public function minus_dm(array $high, array $low, int $timePeriod = 14): array |
||
2334 | |||
2335 | /** |
||
2336 | * Momentum. |
||
2337 | * |
||
2338 | * @param array $real Array of real values. |
||
2339 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2340 | * |
||
2341 | * @return array Returns an array with calculated data. |
||
2342 | */ |
||
2343 | public function mom(array $real, int $timePeriod = 10): array |
||
2351 | |||
2352 | /** |
||
2353 | * Vector Arithmetic Mult. |
||
2354 | * |
||
2355 | * Calculates the vector dot product of real0 with real1 and returns the resulting vector. |
||
2356 | * |
||
2357 | * @param array $real0 Array of real values. |
||
2358 | * @param array $real1 Array of real values. |
||
2359 | * |
||
2360 | * @return array Returns an array with calculated data. |
||
2361 | */ |
||
2362 | public function mult(array $real0, array $real1): array |
||
2370 | |||
2371 | /** |
||
2372 | * Normalized Average True Range. |
||
2373 | * |
||
2374 | * @param array $high High price, array of real values. |
||
2375 | * @param array $low Low price, array of real values. |
||
2376 | * @param array $close Closing price, array of real values. |
||
2377 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2378 | * |
||
2379 | * @return array Returns an array with calculated data. |
||
2380 | */ |
||
2381 | public function natr(array $high, array $low, array $close, int $timePeriod = 14): array |
||
2389 | |||
2390 | /** |
||
2391 | * On Balance Volume. |
||
2392 | * |
||
2393 | * @param array $real Array of real values. |
||
2394 | * @param array $volume Volume traded, array of real values. |
||
2395 | * |
||
2396 | * @return array Returns an array with calculated data. |
||
2397 | */ |
||
2398 | public function obv(array $real, array $volume): array |
||
2406 | |||
2407 | /** |
||
2408 | * Plus Directional Indicator. |
||
2409 | * |
||
2410 | * @param array $high High price, array of real values. |
||
2411 | * @param array $low Low price, array of real values. |
||
2412 | * @param array $close Closing price, array of real values. |
||
2413 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2414 | * |
||
2415 | * @return array Returns an array with calculated data. |
||
2416 | */ |
||
2417 | public function plus_di(array $high, array $low, array $close, int $timePeriod = 14): array |
||
2425 | |||
2426 | /** |
||
2427 | * Plus Directional Movement. |
||
2428 | * |
||
2429 | * @param array $high High price, array of real values. |
||
2430 | * @param array $low Low price, array of real values. |
||
2431 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2432 | * |
||
2433 | * @return array Returns an array with calculated data. |
||
2434 | */ |
||
2435 | public function plus_dm(array $high, array $low, int $timePeriod = 14): array |
||
2443 | |||
2444 | /** |
||
2445 | * Percentage Price Oscillator. |
||
2446 | * |
||
2447 | * @param array $real Array of real values. |
||
2448 | * @param int $fastPeriod Number of period for the fast MA. Valid range from 2 to 100000. |
||
2449 | * @param int $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000. |
||
2450 | * @param int $mAType Type of Moving Average. MA_TYPE_* series of constants should be used. |
||
2451 | * |
||
2452 | * @return array Returns an array with calculated data. |
||
2453 | */ |
||
2454 | public function ppo(array $real, int $fastPeriod = 12, int $slowPeriod = 26, int $mAType = 0): array |
||
2462 | |||
2463 | /** |
||
2464 | * Rate of change : ((price/prevPrice)-1)*100. |
||
2465 | * |
||
2466 | * @param array $real Array of real values. |
||
2467 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2468 | * |
||
2469 | * @return array Returns an array with calculated data. |
||
2470 | */ |
||
2471 | public function roc(array $real, int $timePeriod = 10): array |
||
2479 | |||
2480 | /** |
||
2481 | * Rate of change Percentage: (price-prevPrice)/prevPrice. |
||
2482 | * |
||
2483 | * @param array $real Array of real values. |
||
2484 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2485 | * |
||
2486 | * @return array Returns an array with calculated data. |
||
2487 | */ |
||
2488 | public function rocp(array $real, int $timePeriod = 10): array |
||
2496 | |||
2497 | /** |
||
2498 | * Rate of change ratio 100 scale: (price/prevPrice)*100. |
||
2499 | * |
||
2500 | * @param array $real Array of real values. |
||
2501 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2502 | * |
||
2503 | * @return array Returns an array with calculated data. |
||
2504 | */ |
||
2505 | public function rocr100(array $real, int $timePeriod = 10): array |
||
2513 | |||
2514 | /** |
||
2515 | * Rate of change ratio: (price/prevPrice). |
||
2516 | * |
||
2517 | * @param array $real Array of real values. |
||
2518 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2519 | * |
||
2520 | * @return array Returns an array with calculated data. |
||
2521 | */ |
||
2522 | public function rocr(array $real, int $timePeriod = 10): array |
||
2530 | |||
2531 | /** |
||
2532 | * Relative Strength Index. |
||
2533 | * |
||
2534 | * @param array $real Array of real values. |
||
2535 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2536 | * |
||
2537 | * @return array Returns an array with calculated data. |
||
2538 | */ |
||
2539 | public function rsi(array $real, int $timePeriod = 14): array |
||
2547 | |||
2548 | /** |
||
2549 | * Parabolic SAR. |
||
2550 | * |
||
2551 | * @param array $high High price, array of real values. |
||
2552 | * @param array $low Low price, array of real values. |
||
2553 | * @param float $acceleration Acceleration Factor used up to the Maximum value. Valid range from 0 to REAL_MAX. |
||
2554 | * @param float $maximum Acceleration Factor Maximum value. Valid range from 0 to REAL_MAX. |
||
2555 | * |
||
2556 | * @return array Returns an array with calculated data. |
||
2557 | */ |
||
2558 | public function sar(array $high, array $low, float $acceleration = 0.02, float $maximum = 0.2): array |
||
2566 | |||
2567 | /** |
||
2568 | * Parabolic SAR - Extended. |
||
2569 | * |
||
2570 | * @param array $high High price, array of real values. |
||
2571 | * @param array $low Low price, array of real values. |
||
2572 | * @param float $startValue Start value and direction. 0 for Auto, >0 for Long, <0 for Short. Valid range from TRADER_REAL_MIN to TRADER_REAL_MAX. |
||
2573 | * @param float $offsetOnReverse Percent offset added/removed to initial stop on short/long reversal. Valid range from 0 to TRADER_REAL_MAX. |
||
2574 | * @param float $accelerationInitLong Acceleration Factor initial value for the Long direction. Valid range from 0 to TRADER_REAL_MAX. |
||
2575 | * @param float $accelerationLong Acceleration Factor for the Long direction. Valid range from 0 to TRADER_REAL_MAX. |
||
2576 | * @param float $accelerationMaxLong Acceleration Factor maximum value for the Long direction. Valid range from 0 to TRADER_REAL_MAX. |
||
2577 | * @param float $accelerationInitShort Acceleration Factor initial value for the Short direction. Valid range from 0 to TRADER_REAL_MAX. |
||
2578 | * @param float $accelerationShort Acceleration Factor for the Short direction. Valid range from 0 to TRADER_REAL_MAX. |
||
2579 | * @param float $accelerationMaxShort Acceleration Factor maximum value for the Short direction. Valid range from 0 to TRADER_REAL_MAX. |
||
2580 | * |
||
2581 | * @return array Returns an array with calculated data. |
||
2582 | */ |
||
2583 | public function sarext( |
||
2612 | |||
2613 | /** |
||
2614 | * Set compatibility mode. |
||
2615 | * |
||
2616 | * Set compatibility mode which will affect the way calculations are done by all the extension functions. |
||
2617 | * |
||
2618 | * @param int $compatId Compatibility Id. TRADER_COMPATIBILITY_* series of constants should be used. |
||
2619 | */ |
||
2620 | public function set_compat(int $compatId) |
||
2624 | |||
2625 | /** |
||
2626 | * Set unstable period. |
||
2627 | * |
||
2628 | * Influences unstable period factor for functions, which are sensible to it. More information about unstable periods can be found on the » TA-Lib API documentation page. |
||
2629 | * |
||
2630 | * @param int $functionId Function ID the factor should be set for. FUNC_UNST_* constant series can be used to affect the corresponding function. |
||
2631 | * @param int $timePeriod Unstable period value. |
||
2632 | */ |
||
2633 | public function set_unstable_period(int $functionId, int $timePeriod) |
||
2637 | |||
2638 | /** |
||
2639 | * Vector Trigonometric Sin. |
||
2640 | * |
||
2641 | * Calculates the sine for each value in real and returns the resulting array. |
||
2642 | * |
||
2643 | * @param array $real Array of real values. |
||
2644 | * |
||
2645 | * @return array Returns an array with calculated data. |
||
2646 | */ |
||
2647 | public function sin(array $real): array |
||
2655 | |||
2656 | /** |
||
2657 | * Vector Trigonometric Sinh. |
||
2658 | * |
||
2659 | * Calculates the hyperbolic sine for each value in real and returns the resulting array. |
||
2660 | * |
||
2661 | * @param array $real Array of real values. |
||
2662 | * |
||
2663 | * @return array Returns an array with calculated data. |
||
2664 | */ |
||
2665 | public function sinh(array $real): array |
||
2673 | |||
2674 | /** |
||
2675 | * Simple Moving Average. |
||
2676 | * |
||
2677 | * @param array $real Array of real values. |
||
2678 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2679 | * |
||
2680 | * @return array Returns an array with calculated data. |
||
2681 | */ |
||
2682 | public function sma(array $real, int $timePeriod = 30): array |
||
2690 | |||
2691 | /** |
||
2692 | * Vector Square Root. |
||
2693 | * |
||
2694 | * Calculates the square root of each value in real and returns the resulting array. |
||
2695 | * |
||
2696 | * @param array $real Array of real values. |
||
2697 | * |
||
2698 | * @return array Returns an array with calculated data. |
||
2699 | */ |
||
2700 | public function sqrt(array $real): array |
||
2708 | |||
2709 | /** |
||
2710 | * Standard Deviation. |
||
2711 | * |
||
2712 | * @param array $real Array of real values. |
||
2713 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2714 | * @param float $nbDev Number of deviations |
||
2715 | * |
||
2716 | * @return array Returns an array with calculated data. |
||
2717 | */ |
||
2718 | public function stddev(array $real, int $timePeriod = 5, float $nbDev = 1.0): array |
||
2726 | |||
2727 | /** |
||
2728 | * Stochastic. |
||
2729 | * |
||
2730 | * @param array $high High price, array of real values. |
||
2731 | * @param array $low Low price, array of real values. |
||
2732 | * @param array $close Time period for building the Fast-K line. Valid range from 1 to 100000. |
||
2733 | * @param int $fastK_Period Time period for building the Fast-K line. Valid range from 1 to 100000. |
||
2734 | * @param int $slowK_Period Smoothing for making the Slow-K line. Valid range from 1 to 100000, usually set to 3. |
||
2735 | * @param int $slowK_MAType Type of Moving Average for Slow-K. MA_TYPE_* series of constants should be used. |
||
2736 | * @param int $slowD_Period Smoothing for making the Slow-D line. Valid range from 1 to 100000. |
||
2737 | * @param int $slowD_MAType Type of Moving Average for Slow-D. MA_TYPE_* series of constants should be used. |
||
2738 | * |
||
2739 | * @return array Returns an array with calculated data. |
||
2740 | */ |
||
2741 | public function stoch( |
||
2766 | |||
2767 | /** |
||
2768 | * Stochastic Fast. |
||
2769 | * |
||
2770 | * @param array $high High price, array of real values. |
||
2771 | * @param array $low Low price, array of real values. |
||
2772 | * @param array $close Time period for building the Fast-K line. Valid range from 1 to 100000. |
||
2773 | * @param int $fastK_Period Time period for building the Fast-K line. Valid range from 1 to 100000. |
||
2774 | * @param int $fastD_Period Smoothing for making the Fast-D line. Valid range from 1 to 100000, usually set to 3. |
||
2775 | * @param int $fastD_MAType Type of Moving Average for Fast-D. MA_TYPE_* series of constants should be used. |
||
2776 | * |
||
2777 | * @return array Returns an array with calculated data. |
||
2778 | */ |
||
2779 | public function stochf( |
||
2800 | |||
2801 | /** |
||
2802 | * Stochastic Relative Strength Index. |
||
2803 | * |
||
2804 | * @param array $real Array of real values. |
||
2805 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2806 | * @param int $fastK_Period Time period for building the Fast-K line. Valid range from 1 to 100000. |
||
2807 | * @param int $fastD_Period Smoothing for making the Fast-D line. Valid range from 1 to 100000, usually set to 3. |
||
2808 | * @param int $fastD_MAType Type of Moving Average for Fast-D. MA_TYPE_* series of constants should be used. |
||
2809 | * |
||
2810 | * @return array Returns an array with calculated data. |
||
2811 | */ |
||
2812 | public function stochrsi( |
||
2831 | |||
2832 | /** |
||
2833 | * Vector Arithmetic Subtraction. |
||
2834 | * |
||
2835 | * Calculates the vector subtraction of real1 from real0 and returns the resulting vector. |
||
2836 | * |
||
2837 | * @param array $real0 Array of real values. |
||
2838 | * @param array $real1 Array of real values. |
||
2839 | * |
||
2840 | * @return array Returns an array with calculated data. |
||
2841 | */ |
||
2842 | public function sub(array $real0, array $real1): array |
||
2850 | |||
2851 | /** |
||
2852 | * Summation. |
||
2853 | * |
||
2854 | * @param array $real Array of real values. |
||
2855 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2856 | * |
||
2857 | * @return array Returns an array with calculated data. |
||
2858 | */ |
||
2859 | public function sum(array $real, int $timePeriod = 30): array |
||
2867 | |||
2868 | /** |
||
2869 | * Triple Exponential Moving Average (T3). |
||
2870 | * |
||
2871 | * @param array $real Array of real values. |
||
2872 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2873 | * @param float $vFactor Volume Factor. Valid range from 1 to 0. |
||
2874 | * |
||
2875 | * @return array Returns an array with calculated data. |
||
2876 | */ |
||
2877 | public function t3(array $real, int $timePeriod = 5, float $vFactor = 0.7): array |
||
2885 | |||
2886 | /** |
||
2887 | * Vector Trigonometric Tan. |
||
2888 | * |
||
2889 | * Calculates the tangent for each value in real and returns the resulting array. |
||
2890 | * |
||
2891 | * @param array $real Array of real values. |
||
2892 | * |
||
2893 | * @return array Returns an array with calculated data. |
||
2894 | */ |
||
2895 | public function tan(array $real): array |
||
2903 | |||
2904 | /** |
||
2905 | * Vector Trigonometric Tanh. |
||
2906 | * |
||
2907 | * Calculates the hyperbolic tangent for each value in real and returns the resulting array. |
||
2908 | * |
||
2909 | * @param array $real Array of real values. |
||
2910 | * |
||
2911 | * @return array Returns an array with calculated data. |
||
2912 | */ |
||
2913 | public function tanh(array $real): array |
||
2921 | |||
2922 | /** |
||
2923 | * Triple Exponential Moving Average. |
||
2924 | * |
||
2925 | * @param array $real Array of real values. |
||
2926 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2927 | * |
||
2928 | * @return array Returns an array with calculated data. |
||
2929 | */ |
||
2930 | public function tema(array $real, int $timePeriod = 30): array |
||
2938 | |||
2939 | /** |
||
2940 | * True Range. |
||
2941 | * |
||
2942 | * @param array $high High price, array of real values. |
||
2943 | * @param array $low Low price, array of real values. |
||
2944 | * @param array $close Closing price, array of real values. |
||
2945 | * |
||
2946 | * @return array Returns an array with calculated data. |
||
2947 | */ |
||
2948 | public function trange(array $high, array $low, array $close): array |
||
2956 | |||
2957 | /** |
||
2958 | * Triangular Moving Average. |
||
2959 | * |
||
2960 | * @param array $real Array of real values. |
||
2961 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2962 | * |
||
2963 | * @return array Returns an array with calculated data. |
||
2964 | */ |
||
2965 | public function trima(array $real, int $timePeriod = 30): array |
||
2973 | |||
2974 | /** |
||
2975 | * 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA. |
||
2976 | * |
||
2977 | * @param array $real Array of real values. |
||
2978 | * @param int $timePeriod [OPTIONAL] [DEFAULT 30] Number of period. Valid range from 2 to 100000. |
||
2979 | * |
||
2980 | * @return array Returns an array with calculated data. |
||
2981 | */ |
||
2982 | public function trix(array $real, int $timePeriod = 30): array |
||
2990 | |||
2991 | /** |
||
2992 | * Time Series Forecast. |
||
2993 | * |
||
2994 | * @param array $real Array of real values. |
||
2995 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
2996 | * |
||
2997 | * @return array Returns an array with calculated data. |
||
2998 | */ |
||
2999 | public function tsf(array $real, int $timePeriod = 14): array |
||
3007 | |||
3008 | /** |
||
3009 | * Typical Price. |
||
3010 | * |
||
3011 | * @param array $high High price, array of real values. |
||
3012 | * @param array $low Low price, array of real values. |
||
3013 | * @param array $close Closing price, array of real values. |
||
3014 | * |
||
3015 | * @return array Returns an array with calculated data. |
||
3016 | */ |
||
3017 | public function typprice(array $high, array $low, array $close): array |
||
3025 | |||
3026 | /** |
||
3027 | * Ultimate Oscillator. |
||
3028 | * |
||
3029 | * @param array $high High price, array of real values. |
||
3030 | * @param array $low Low price, array of real values. |
||
3031 | * @param array $close Closing price, array of real values. |
||
3032 | * @param int $timePeriod1 Number of bars for 1st period. Valid range from 1 to 100000. |
||
3033 | * @param int $timePeriod2 Number of bars for 2nd period. Valid range from 1 to 100000. |
||
3034 | * @param int $timePeriod3 Number of bars for 3rd period. Valid range from 1 to 100000. |
||
3035 | * |
||
3036 | * @return array Returns an array with calculated data. |
||
3037 | */ |
||
3038 | public function ultosc( |
||
3052 | |||
3053 | /** |
||
3054 | * Variance. |
||
3055 | * |
||
3056 | * @param array $real Array of real values. |
||
3057 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
3058 | * @param float $nbDev Number of deviations |
||
3059 | * |
||
3060 | * @return array Returns an array with calculated data. |
||
3061 | */ |
||
3062 | public function var(array $real, int $timePeriod = 5, float $nbDev = 1.0): array |
||
3070 | |||
3071 | /** |
||
3072 | * Weighted Close Price. |
||
3073 | * |
||
3074 | * @param array $high High price, array of real values. |
||
3075 | * @param array $low Low price, array of real values. |
||
3076 | * @param array $close Closing price, array of real values. |
||
3077 | * |
||
3078 | * @return array Returns an array with calculated data. |
||
3079 | */ |
||
3080 | public function wclprice(array $high, array $low, array $close): array |
||
3088 | |||
3089 | /** |
||
3090 | * Williams' %R. |
||
3091 | * |
||
3092 | * @param array $high High price, array of real values. |
||
3093 | * @param array $low Low price, array of real values. |
||
3094 | * @param array $close Closing price, array of real values. |
||
3095 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
3096 | * |
||
3097 | * @return array Returns an array with calculated data. |
||
3098 | */ |
||
3099 | public function willr(array $high, array $low, array $close, int $timePeriod = 14): array |
||
3107 | |||
3108 | /** |
||
3109 | * Weighted Moving Average. |
||
3110 | * |
||
3111 | * @param array $real Array of real values. |
||
3112 | * @param int $timePeriod Number of period. Valid range from 2 to 100000. |
||
3113 | * |
||
3114 | * @return array Returns an array with calculated data. |
||
3115 | */ |
||
3116 | public function wma(array $real, int $timePeriod = 30): array |
||
3124 | |||
3125 | /** |
||
3126 | * Handle errors. |
||
3127 | * |
||
3128 | * @throws \BadFunctionCallException |
||
3129 | */ |
||
3130 | abstract protected function handleErrors(); |
||
3131 | } |
||
3132 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.