diff --git a/testing.php b/test-stockMarket.php similarity index 53% rename from testing.php rename to test-stockMarket.php index 8938183..8d8345e 100644 --- a/testing.php +++ b/test-stockMarket.php @@ -8,7 +8,6 @@ hammering Poloniex half to death. */ - ini_set('display_errors', 1); //include 'buffer.php'; @@ -20,12 +19,15 @@ spl_autoload_register(function ($class_name) { $chartData = []; -$start = 0.01;// * rand()/getRandMax(); -$volatility = 0.002; +$offset = 100 * (rand()/getRandMax())**4; +$scale = 100 * (rand()/getRandMax())**4; +$volatility = 0.5 * (rand()/getRandMax())**3; -for ($n = 0, $current = $start; $n < 50; $n++) { - $current += $volatility * (rand()/getRandMax() - 0.5)**3; +for ($n = 0, $current = $offset + 0.5 * $scale; $n < 96; $n++) { + $current -= $offset; + $current *= 1 + $volatility * (rand()/getRandMax() - 0.5); + $current += $offset; $chartData[$n] = $current; } -print SVGChartBuilder::renderStockChart($chartData); +print SVGChartBuilder::renderStockChart($chartData, 1000, "#708", "#777", false); diff --git a/test-temperature.php b/test-temperature.php new file mode 100644 index 0000000..723955f --- /dev/null +++ b/test-temperature.php @@ -0,0 +1,34 @@ +