positiveway / SureFinder

Surebet scanner and betting bot
29 stars 10 forks source link

Calculator and UI for Scanner #93

Closed ghost closed 6 years ago

ghost commented 6 years ago

Crete site with functionality and UI similar to Positive

Server

UI

List of surebets

Row description

Button bar

positivebet-button-bar

Filter

By bookmaker, by sport.

Calculator

Formulae

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

positivebet-calc-1

The bet on which the profit will be distributed

positivebet-calc-profit-distribution

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

positivebet-calc-copying

Final look (Private scanner) theforks-calc

theforks-calc

theforks-calc-3

more info at TheForks manual

ghost commented 6 years ago

Add ID for each surebet. It will be used for tracking surebet during its lifetime

machulan commented 6 years ago

Currency

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

Calculator should be fixed at the top of the page (see positive).

calculator_variables

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
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
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