Reputation: 63
I don't know if anyone has run into this or have had a similar problem with the PHP trader extension:
http://php.net/manual/en/book.trader.php
Any help would be really appreciated, here's what I have done:
BUT whenever I try to run ANY of the candle recognition functions I get a response of "False", which looking at the link below means the function has not run correctly. I'm expecting an Array of 6 results not a Boolean of "False".
http://php.net/manual/en/function.trader-cdldoji.php
$open = [112.818, 112.226, 111.725, 112.144, 112.463, 112.205];
$high = [113.21,113.257,112.476,112.53,112.554,112.716];
$low = [112.253,112.219,111.497,111.474,111.653,112.134];
$close = [112.339,112.804,112.234,111.716,111.993,112.483];
$test1 = trader_cdldoji($open, $high, $low, $close);
var_dump($test1);
I'm really struggling with this as the code above is so simple I can't believe it doesn't work, I have also tried the following:
$open = [112.818, 112.226, 111.725, 112.144, 112.463, 112.205];
$high = [113.21,113.257,112.476,112.53,112.554,112.716];
$low = [112.253,112.219,111.497,111.474,111.653,112.134];
$close = [112.339,112.804,112.234,111.716,111.993,112.483];
$test1 = array(trader_cdldoji($open, $high, $low, $close));
var_dump($test1);
I'm really hoping I've done something really stupid that I just can't see after a couple of hours of hair pulling! Any help much appreciated, thanks everyone,
George
Upvotes: 6
Views: 697
Reputation: 11328
I have no idea what that function does (the documentation for the trader
extension is hopelessly lacking), but it appears that 6 values is not enough. I ran some tests and only got it to give me an actual result if the arrays contain 11 or more values.
Upvotes: 3