Closed ghost closed 6 years ago
Add ID for each surebet. It will be used for tracking surebet during its lifetime
Bet amount, profit, bank (sum of bet amounts), rounding are measured in roubles. Surebet yield is measured in percent. Coefficient (odd, wager) is number.
Calculator should be fixed at the top of the page (see positive).
When the surebet is added to the calculator it is necessary to calculate the following variables:
w1 = w1.factor
w2 = w2.factor
yield = 1 / w1 + 1 / w2
bet1
) fixed (radiobutton1
checked):yield = 1 / w1 + 1 / w2
// floor rounding
bet2_floor = floor(bet1 * (w1 * yield - 1), rounding2)
bank_floor = bet1 + bet2_floor
profit1_floor = w1 * bet1 - bank_floor
profit2_floor = w2 * bet2_floor - bank_floor
// ceiling rounding
bet2_ceiling = ceiling(bet1 * (w1 * yield - 1), rounding2)
bank_ceiling = bet1 + bet2_ceiling
profit1_ceiling = w1 * bet1 - bank_ceiling
profit2_ceiling = w2 * bet2_ceiling - bank_ceiling
if abs(profit1_floor - profit2_floor) < abs(profit1_ceiling - profit2_ceiling):
bet2 = bet2_floor
bank = bank_floor
profit1 = profit1_floor
profit2 = profit2_floor
else:
bet2 = bet2_ceiling
bank = bank_ceiling
profit1 = profit1_ceiling
profit2 = profit2_ceiling
bet2
) fixed (radiobutton2
checked):yield = 1 / w1 + 1 / w2
// floor rounding
bet1_floor = floor(bet2 * (w2 * yield - 1), rounding1)
bank_floor = bet2 + bet1_floor
profit1_floor = w1 * bet1_floor - bank_floor
profit2_floor = w2 * bet2 - bank_floor
// ceiling rounding
bet1_ceiling = ceiling(bet2 * (w2 * yield - 1), rounding1)
bank_ceiling = bet2 + bet1_ceiling
profit1_ceiling = w1 * bet1_ceiling - bank_ceiling
profit2_ceiling = w2 * bet2 - bank_ceiling
if abs(profit1_floor - profit2_floor) < abs(profit1_ceiling - profit2_ceiling):
bet1 = bet1_floor
bank = bank_floor
profit1 = profit1_floor
profit2 = profit2_floor
else:
bet1 = bet1_ceiling
bank = bank_ceiling
profit1 = profit1_ceiling
profit2 = profit2_ceiling
Crete site with functionality and UI similar to Positive
Server
[x] Add Flask server in module
ui
, fileserver.py
It will loadindex.html
and JS code of UI[x] Add RESTful API method that we will produce list of
DetailedSurebet
s converted to JSONUI
[ ] Copy and adapt HTML from positive
Design
List of surebets. When user click on surebet, its params are auto added to the calculator Example (Positive):
[ ] Add bet calculator with similar functionality
List of surebets
Row description
Button bar
Filter
By bookmaker, by sport.
Calculator
Formulae
Rounding
Calculated bet amount should be rounded to fixed value (10, 50, 100).
On default:
As for the up (ceiling) and down (floor) rounding, choose the rounding type at which the difference between the profits is the smallest.
Bet amount fixing
The bet on which the profit will be distributed
A checkbox affects the profits and bet amount on other bet.
Odds
Odds may be changed only by user or by adding surebet to calculator, not by calculator.
Profit
Profits may be changed only by calculator.
Pushing team name to copy buffer
Final look (Private scanner)
more info at TheForks manual