dbo.fn_AlembertSize

Syntax:
dbo.fn_AlembertSize(id_strategy, unit_value, current_price, bid_type)

Output:
(decimal) Returns the size of the next bet in an Alembert progression. If returns zero the strategy has run out of money.
You can get more info from the strategy Alembert Back.

Input parameters:
id_strategy (integer)Id of the strategy.
unit_value (decimal) The amount of money for every unit in the D'Alambert progression.
current_price (decimal)The price of the horse the strategy is going to bet; normally are horse with an odd very close to the even odd. This value is used by the function to adjust the size of the bet.
bid_type (b|l)The type of bets placed by the Alembert progression; if b all the bets will be back type, if l all the bets will be lay type.

Example:

size="dbo.fn_Alembertsize(@id_strategy,
  (dbo.fn_strategyproperty(@id_strategy,'initial_capital')/200),
   @best_back_price,
   'b')"