Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include(dirname(__FILE__) . "/../../../init.php");
- $data = file(__DIR__ . "/FON_PIN__TENNIS.csv");
- $P=1000; $W=50;
- for($P=0; $P<count($data); $P+=5){
- $sum_amount = 0.0; $sum_profit = 0.0;
- for($i=$P+1; $i<(count($data) < ($_=$P+$W+1) ? count($data) : $P+$W+1); $i+=1){
- $r = explode(";", trim($data[$i], "\r\n\t "));
- #print_r($r); exit;
- list($bet_result, $cf) = array($r[0], $r[17]);
- $amount = 100;
- $amount = $amount / ($cf - 1);
- $profit = $bet_result == 1 ? ($amount * ($cf - 1)) : -$amount;
- $sum_amount += $amount;
- $sum_profit += $profit;
- }
- echo __("%d:\t%d: %.2f x %d = %d\t\t%d / %d\t\tROI=%.2f%%\n", $i-$W, $bet_result, $cf, $amount, $profit, $sum_amount, $sum_profit, ($sum_profit/$sum_amount)*100);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement