dbo.fn_MasanielloSize

Syntax:
dbo.fn_MasanielloSize(id_strategy, capital, win_events, tot_events, price, bid_type, skip_last)

Output:
(decimal) Returns the size of the next bet in a Masaniello progression.
If returns zero the strategy is reset; this can happen for one of the following reasons:

  • The maximum number of losing bets in a round has been overcome.
  • The last bet was winning but partially matched. In this case the capital could be not enough to finish the round.
  • The next bet is the last bet of the round and the parameter skip_last is 1.

You can get more info from the strategy Masaniello.

Input parameters:
id_strategy (integer)Id of the strategy.
capital (decimal) Capital used by Masaniello progression. it is a good practice to give to the strategy a capital 10% greater than the one specified in this parameter: this to compensate eventual discrepancies, due for example the retirement of a horse or a dead heat.
win_events (integer)The number of events we guess to win.
tot_events (integer)The total number of events of the progression.
price (decimal)The minimum price at which the bets will be placed.
bid_type (b|l)The type of bets placed by the Masaniello progression; if b all the bets will be back type, if l all the bets will be lay type.
skip_last (0|l)If it is equal to 1, the last bet of the Masaniello round is not placed and the strategy is reset. This is useful in a capital conservative approch, where we don't want to risk most of the capital of the round in a single bet (the last).

Example:
size="dbo.fn_masaniellosize(@id_strategy, 2, 6, 16, 1.96, 'b',0)"