Git Product home page Git Product logo

betting-indicators's Introduction

betting-indicators

Betting Indicators e.g. ROI, Yield, Profitability, Hit Rate

Install

$ npm install @kamdz/betting-indicators

Usage

const indicators = require("@kamdz/betting-indicators");

indicators.yield({
  balance: 12760,
  bankroll: 10000,
  losses: new Array(170).fill(100),
  wins: new Array(195).fill(100),
});
//=> "7.56%"

indicators.roi({ balance, bankroll })

params

balance

Type: number

Your current account balance.

bankroll

Type: number

Your starting account bankroll.

return

Type: string
Default: 0%

ROI stands for the Return on Investment.

indicators.yield({ balance, bankroll, wins, losses })

params

balance

Type: number

Current account balance.

bankroll

Type: number

Starting account bankroll.

wins

Type: number[]

Array of numbers with won bet stakes.

losses

Type: number[]

Array of numbers with lost bet stakes.

return

Type: string
Default: 0%

Yield measures betting efficiency compared to total turnover.

indicators.profitability({ balance, bankroll, losses })

params

balance

Type: number

Current account balance.

bankroll

Type: number

Starting account bankroll.

losses

Type: number[]

Your starting account bankroll.

return

Type: string
Default: 0%

Profitability is the ability of a business to earn a profit.

indicators.hitRate({ wins, losses })

params

wins

Type: number[]

Array of numbers with won bet stakes.

losses

Type: number[]

Array of numbers with lost bet stakes.

return

Type: string
Default: 0%

Hit Rate is the number of winning bets concerning all placed bets.

indicators.profit({ balance, bankroll })

params

balance

Type: number

Your current account balance.

bankroll

Type: number

Your starting account bankroll.

return

Type: number
Default: 0

Profit is simply difference between the current account balance and starting account bankroll.

indicators.all({ balance, bankroll, wins, losses })

params

balance

Type: number

Current account balance.

bankroll

Type: number

Starting account bankroll.

wins

Type: number[]

Array of numbers with won bet stakes.

losses

Type: number[]

Array of numbers with lost bet stakes.

return

Type: Object
Structure: { roi, yield, profitability, hitRate, profit }

Object with all indicators.

betting-indicators's People

Contributors

kamdz avatar

Watchers

 avatar

Forkers

asvis

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.