-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathTrader.php
2464 lines (2295 loc) · 97.6 KB
/
Trader.php
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<?php
namespace LupeCode\phpTraderInterface;
require_once __DIR__ . '/TraderTrait.php';
/**
* Class Trader
*
* This class extends the original extension to include friendlier names.
*
* @package LupeCode\phpTraderInterface
*/
class Trader
{
use TraderTrait;
/**
* Vector arc cosine
*
* Calculates the arc cosine for each value in real and returns the resulting array.
*
* @param array $real Array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function mathArcCosine(array $real): array
{
return static::acos($real);
}
/**
* Chaikin Accumulation Distribution Line
*
* This indicator is a volume based indicator developed by Marc Chaikin which measures the cumulative flow of money into and out of an instrument.
* The A/D line is calculated by multiplying the specific period’s volume with a multiplier that is based on the relationship of the closing price to the high-low range.
* The A/D Line is formed by the running total of the Money Flow Volume. This indicator can be used to assert an underlying trend or to predict reversals.
*
* The combination of a high positive multiplier value and high volume indicates buying pressure.
* So even with a downtrend in prices when there is an uptrend in the Accumulation Distribution Line there is indication for buying pressure (accumulation) that may result to a bullish reversal.
*
* Conversely a low negative multiplier value combined with, again, high volumes indicates selling pressure (distribution).
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param array $volume Volume traded, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function chaikinAccumulationDistributionLine(array $high, array $low, array $close, array $volume): array
{
return static::ad($high, $low, $close, $volume);
}
/**
* Calculates the vector addition of real0 to real1 and returns the resulting vector.
*
* @param array $real0 Array of real values.
* @param array $real1 Array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function mathAddition(array $real0, array $real1): array
{
return static::add($real0, $real1);
}
/**
* Chaikin Accumulation Distribution Oscillator
*
* Chaikin Oscillator is positive when the 3-day EMA moves higher than the 10-day EMA and vice versa.
*
* The Chaikin Oscillator is the continuation of the Chaikin A/D Line and is used to observe changes in the A/D Line.
*
* The oscillator is based on the difference between the 3-day Exponential Moving Average (EMA) of the A/D Line and the 10-day EMA of the A/D Line and hence adds momentum to the A/D Line.
* It is helpful for investors to use the Oscillator in order to determine the appropriate timing of trend reversals.
*
* When the Chaikin Oscillator turns positive there is indication that the A/D Line will increase and hence a Bullish (buy) signal will be generated. On the other hand a move into negative territory indicates a Bearish (sell) signal.
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param array $volume Volume traded, array of real values.
* @param int|null $fastPeriod Number of period for the fast MA. Valid range from 2 to 100000.
* @param int|null $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function chaikinAccumulationDistributionOscillator(array $high, array $low, array $close, array $volume, int $fastPeriod = null, int $slowPeriod = null): array
{
return static::adosc($high, $low, $close, $volume, $fastPeriod, $slowPeriod);
}
/**
* Average Directional Movement Index
*
* Developed by J. Welles Wilder and described in his book “New Concepts in Technical Trading Systems”, the Average Directional Movement Index (ADX) is a technical indicator that describes if a market or a financial instrument is trending or not.
*
* The ADX is a combination of two other indicators developed by Wilder, the positive directional indicator (+DI) and the negative directional indicator (-DI).
*
* Wilder recommends buying when +DI is higher than -DI, and selling when +DI is lower than -DI.
*
* The ADX indicates trend strength, not trend direction, and it is a lagging indicator.
*
* ADX range is between 0 and 100. Generally ADX readings below 20 indicate trend weakness, and readings above 40 indicate trend strength.
* An extremely strong trend is indicated by readings above 50.
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function averageDirectionalMovementIndex(array $high, array $low, array $close, int $timePeriod = null): array
{
return static::adx($high, $low, $close, $timePeriod);
}
/**
* Average Directional Movement Index Rating
*
* The Average Directional Movement Index Rating (ADXR) measures the strength of the Average Directional Movement Index (ADX).
* It's calculated by taking the average of the current ADX and the ADX from one time period before (time periods can vary, but the most typical period used is 14 days).
*
* Like the ADX, the ADXR ranges from values of 0 to 100 and reflects strengthening and weakening trends.
* However, because it represents an average of ADX, values don't fluctuate as dramatically and some analysts believe the indicator helps better display trends in volatile markets.
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function averageDirectionalMovementIndexRating(array $high, array $low, array $close, int $timePeriod = null): array
{
return static::adxr($high, $low, $close, $timePeriod);
}
/**
* Absolute Price Oscillator
*
* The Absolute Price Oscillator (APO) is based on the absolute differences between two moving averages of different lengths, a ‘Fast’ and a ‘Slow’ moving average.
* A positive indicator value indicates an upward movement, while negative readings signal a downward trend.
*
* Divergences form when a new high or low in price is not confirmed by the Absolute Price Oscillator (APO).
* A bullish divergence forms when price make a lower low, but the APO forms a higher low.
* This indicates less downward momentum that could foreshadow a bullish reversal.
* A bearish divergence forms when price makes a higher high, but the APO forms a lower high.
* This shows less upward momentum that could foreshadow a bearish reversal.
*
* @param array $real Array of real values.
* @param int|null $fastPeriod Number of period for the fast MA. Valid range from 2 to 100000.
* @param int|null $slowPeriod Number of period for the slow MA. Valid range from 2 to 100000.
* @param int|null $mAType Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function absolutePriceOscillator(array $real, int $fastPeriod = null, int $slowPeriod = null, int $mAType = null): array
{
return static::apo($real, $fastPeriod, $slowPeriod, $mAType);
}
/**
* Aroon
*
* The Aroon indicator was developed by Tushar Chande in 1995.
*
* Both the Aroon up and the Aroon down fluctuate between zero and 100, with values close to 100 indicating a strong trend, and zero indicating a weak trend.
* The lower the Aroon up, the weaker the uptrend and the stronger the downtrend, and vice versa.
* The main assumption underlying this indicator is that a stock's price will close at record highs in an uptrend, and record lows in a downtrend.
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function aroonIndicator(array $high, array $low, int $timePeriod = null): array
{
return static::aroon($high, $low, $timePeriod);
}
/**
* Aroon Oscillator
*
* The Aroon oscillator is calculated by subtracting Aroon down from Aroon up.
* Readings above zero indicate that an uptrend is present, while readings below zero indicate that a downtrend is present.
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function arronOscillator(array $high, array $low, int $timePeriod = null): array
{
return static::aroonosc($high, $low, $timePeriod);
}
/**
* Vector Trigonometric ASin
*
* Calculates the arc sine for each value in real and returns the resulting array.
*
* @param array $real Array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function mathArcSine(array $real): array
{
return static::asin($real);
}
/**
* Vector Trigonometric ATan
*
* Calculates the arc tangent for each value in real and returns the resulting array.
*
* @param array $real Array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function mathArcTangent(array $real): array
{
return static::atan($real);
}
/**
* Average True Range
*
* The average true range (ATR) is a measure of volatility introduced by Welles Wilder in his book, "New Concepts in Technical Trading Systems."
* The true range indicator is the greatest of the following:
* current high less the current low,
* the absolute value of the current high less the previous close,
* and the absolute value of the current low less the previous close.
* The average true range is a moving average, generally 14 days, of the true ranges.
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function averageTrueRange(array $high, array $low, array $close, int $timePeriod = null): array
{
return static::atr($high, $low, $close, $timePeriod);
}
/**
* Average Price
*
* An average price is a representative measure of a range of prices that is calculated by taking the sum of the values and dividing it by the number of prices being examined.
* The average price reduces the range into a single value, which can then be compared to any point to determine if the value is higher or lower than what would be expected.
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function averagePrice(array $open, array $high, array $low, array $close): array
{
return static::avgprice($open, $high, $low, $close);
}
/**
* Bollinger Bands
*
* A Bollinger Band® is a band plotted two standard deviations away from a simple moving average, developed by famous technical trader John Bollinger.
*
* Because standard deviation is a measure of volatility, Bollinger Bands® adjust themselves to the market conditions.
* When the markets become more volatile, the bands widen (move further away from the average), and during less volatile periods, the bands contract (move closer to the average).
* The tightening of the bands is often used by technical traders as an early indication that the volatility is about to increase sharply.
*
* @param array $real Array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
* @param float|null $nbDevUp Deviation multiplier for upper band. Valid range from TRADER_REAL_MIN to TRADER_REAL_MAX.
* @param float|null $nbDevDn Deviation multiplier for lower band. Valid range from TRADER_REAL_MIN to TRADER_REAL_MAX.
* @param int|null $mAType Type of Moving Average. TRADER_MA_TYPE_* series of constants should be used.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function bollingerBands(array $real, int $timePeriod = null, float $nbDevUp = null, float $nbDevDn = null, int $mAType = null): array
{
return static::bbands($real, $timePeriod, $nbDevUp, $nbDevDn, $mAType);
}
/**
* Beta
*
* Beta is a measure of the volatility, or systematic risk, of a security or a portfolio in comparison to the market as a whole.
* Beta is used in the capital asset pricing model (CAPM), which calculates the expected return of an asset based on its beta and expected market returns.
* Beta is also known as the beta coefficient.
*
* A beta of 1 indicates that the security's price moves with the market.
* A beta of less than 1 means that the security is theoretically less volatile than the market.
* A beta of greater than 1 indicates that the security's price is theoretically more volatile than the market.
*
* @param array $real0 Array of real values.
* @param array $real1 Array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function betaVolatility(array $real0, array $real1, int $timePeriod = null): array
{
return static::beta($real0, $real1, $timePeriod);
}
/**
* Balance Of Power
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function balanceOfPower(array $open, array $high, array $low, array $close): array
{
return static::bop($open, $high, $low, $close);
}
/**
* Commodity Channel Index
*
* An oscillator used in technical analysis to help determine when an investment vehicle has been overbought and oversold.
* The Commodity Channel Index, first developed by Donald Lambert, quantifies the relationship between the asset's price, a moving average (MA) of the asset's price, and normal deviations (D) from that average.
*
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param int|null $timePeriod Number of period. Valid range from 2 to 100000.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function commodityChannelIndex(array $high, array $low, array $close, int $timePeriod = null): array
{
return static::cci($high, $low, $close, $timePeriod);
}
/**
* Two Crows
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleTwoCrows(array $open, array $high, array $low, array $close): array
{
return static::cdl2crows($open, $high, $low, $close);
}
/**
* Three Black Crows
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleThreeBlackCrows(array $open, array $high, array $low, array $close): array
{
return static::cdl3blackcrows($open, $high, $low, $close);
}
/**
* Three Inside Up/Down
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleThreeInsideUpDown(array $open, array $high, array $low, array $close): array
{
return static::cdl3inside($open, $high, $low, $close);
}
/**
* Three-Line Strike
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleThreeLineStrike(array $open, array $high, array $low, array $close): array
{
return static::cdl3linestrike($open, $high, $low, $close);
}
/**
* Three Outside Up/Down
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleThreeOutsideUpDown(array $open, array $high, array $low, array $close): array
{
return static::cdl3outside($open, $high, $low, $close);
}
/**
* Three Stars In The South
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleThreeStarsInTheSouth(array $open, array $high, array $low, array $close): array
{
return static::cdl3starsinsouth($open, $high, $low, $close);
}
/**
* Three Advancing White Soldiers
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleThreeWhiteSoldiers(array $open, array $high, array $low, array $close): array
{
return static::cdl3whitesoldiers($open, $high, $low, $close);
}
/**
* Abandoned Baby
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param float $penetration Percentage of penetration of a candle within another candle.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleAbandonedBaby(array $open, array $high, array $low, array $close, float $penetration = null): array
{
return static::cdlabandonedbaby($open, $high, $low, $close, $penetration);
}
/**
* Advance Block
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleAdvanceBlock(array $open, array $high, array $low, array $close): array
{
return static::cdladvanceblock($open, $high, $low, $close);
}
/**
* Belt-hold
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleBeltHold(array $open, array $high, array $low, array $close): array
{
return static::cdlbelthold($open, $high, $low, $close);
}
/**
* Breakaway
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleBreakaway(array $open, array $high, array $low, array $close): array
{
return static::cdlbreakaway($open, $high, $low, $close);
}
/**
* Closing Marubozu
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleClosingMarubozu(array $open, array $high, array $low, array $close): array
{
return static::cdlclosingmarubozu($open, $high, $low, $close);
}
/**
* Concealing Baby Swallow
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleConcealingBabySwallow(array $open, array $high, array $low, array $close): array
{
return static::cdlconcealbabyswall($open, $high, $low, $close);
}
/**
* Counterattack
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleCounterattack(array $open, array $high, array $low, array $close): array
{
return static::cdlcounterattack($open, $high, $low, $close);
}
/**
* Dark Cloud Cover
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param float $penetration Percentage of penetration of a candle within another candle.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleDarkCloudCover(array $open, array $high, array $low, array $close, float $penetration = null): array
{
return static::cdldarkcloudcover($open, $high, $low, $close, $penetration);
}
/**
* Doji
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleDoji(array $open, array $high, array $low, array $close): array
{
return static::cdldoji($open, $high, $low, $close);
}
/**
* Doji Star
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleDojiStar(array $open, array $high, array $low, array $close): array
{
return static::cdldojistar($open, $high, $low, $close);
}
/**
* Dragonfly Doji
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleDragonflyDoji(array $open, array $high, array $low, array $close): array
{
return static::cdldragonflydoji($open, $high, $low, $close);
}
/**
* Engulfing Pattern
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleEngulfingPattern(array $open, array $high, array $low, array $close): array
{
return static::cdlengulfing($open, $high, $low, $close);
}
/**
* Evening Doji Star
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param float $penetration Percentage of penetration of a candle within another candle.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleEveningDojiStar(array $open, array $high, array $low, array $close, float $penetration = null): array
{
return static::cdleveningdojistar($open, $high, $low, $close, $penetration);
}
/**
* Evening Star
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param float $penetration Percentage of penetration of a candle within another candle.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleEveningStar(array $open, array $high, array $low, array $close, float $penetration = null): array
{
return static::cdleveningstar($open, $high, $low, $close, $penetration);
}
/**
* Up/Down-gap side-by-side white lines
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleUpDownGapsSideBySideWhiteLines(array $open, array $high, array $low, array $close): array
{
return static::cdlgapsidesidewhite($open, $high, $low, $close);
}
/**
* Gravestone Doji
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleGravestoneDoji(array $open, array $high, array $low, array $close): array
{
return static::cdlgravestonedoji($open, $high, $low, $close);
}
/**
* Hammer
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleHammer(array $open, array $high, array $low, array $close): array
{
return static::cdlhammer($open, $high, $low, $close);
}
/**
* Hanging Man
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleHangingMan(array $open, array $high, array $low, array $close): array
{
return static::cdlhangingman($open, $high, $low, $close);
}
/**
* Harami Pattern
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleHarami(array $open, array $high, array $low, array $close): array
{
return static::cdlharami($open, $high, $low, $close);
}
/**
* Harami Cross Pattern
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleHaramiCross(array $open, array $high, array $low, array $close): array
{
return static::cdlharamicross($open, $high, $low, $close);
}
/**
* High-Wave Candle
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleHighWave(array $open, array $high, array $low, array $close): array
{
return static::cdlhighwave($open, $high, $low, $close);
}
/**
* Hikkake Pattern
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleHikkake(array $open, array $high, array $low, array $close): array
{
return static::cdlhikkake($open, $high, $low, $close);
}
/**
* Modified Hikkake Pattern
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleModifiedHikkake(array $open, array $high, array $low, array $close): array
{
return static::cdlhikkakemod($open, $high, $low, $close);
}
/**
* Homing Pigeon
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleHomingPigeon(array $open, array $high, array $low, array $close): array
{
return static::cdlhomingpigeon($open, $high, $low, $close);
}
/**
* Identical Three Crows
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleIdenticalThreeCrows(array $open, array $high, array $low, array $close): array
{
return static::cdlidentical3crows($open, $high, $low, $close);
}
/**
* In-Neck Pattern
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleInNeck(array $open, array $high, array $low, array $close): array
{
return static::cdlinneck($open, $high, $low, $close);
}
/**
* Inverted Hammer
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleInvertedHammer(array $open, array $high, array $low, array $close): array
{
return static::cdlinvertedhammer($open, $high, $low, $close);
}
/**
* Kicking
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleKicking(array $open, array $high, array $low, array $close): array
{
return static::cdlkicking($open, $high, $low, $close);
}
/**
* Kicking - bull/bear determined by the longer marubozu
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleKickingByLength(array $open, array $high, array $low, array $close): array
{
return static::cdlkickingbylength($open, $high, $low, $close);
}
/**
* Ladder Bottom
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleLadderBottom(array $open, array $high, array $low, array $close): array
{
return static::cdlladderbottom($open, $high, $low, $close);
}
/**
* Long Legged Doji
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleLongLeggedDoji(array $open, array $high, array $low, array $close): array
{
return static::cdllongleggeddoji($open, $high, $low, $close);
}
/**
* Long Line Candle
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleLongLine(array $open, array $high, array $low, array $close): array
{
return static::cdllongline($open, $high, $low, $close);
}
/**
* Marubozu
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleMarubozu(array $open, array $high, array $low, array $close): array
{
return static::cdlmarubozu($open, $high, $low, $close);
}
/**
* Matching Low
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleMatchingLow(array $open, array $high, array $low, array $close): array
{
return static::cdlmatchinglow($open, $high, $low, $close);
}
/**
* Mat Hold
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param float $penetration Percentage of penetration of a candle within another candle.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleMatHold(array $open, array $high, array $low, array $close, float $penetration = null): array
{
return static::cdlmathold($open, $high, $low, $close, $penetration);
}
/**
* Morning Doji Star
*
* @param array $open Opening price, array of real values.
* @param array $high High price, array of real values.
* @param array $low Low price, array of real values.
* @param array $close Closing price, array of real values.
* @param float $penetration Percentage of penetration of a candle within another candle.
*
* @return array Returns an array with calculated data or false on failure.
*/
public static function candleMorningDojiStar(array $open, array $high, array $low, array $close, float $penetration = null): array
{
return static::cdlmorningdojistar($open, $high, $low, $close, $penetration);
}
/**