dbo.fn_StrategyProperty

Syntax:
dbo.fn_StrategyProperty(id_strategy, property)

Output:
(decimal) Returns properties of a specific strategy.

Input parameters:
id_strategy (integer)Id of the strategy.
property (string) Can return one of the following properties:
  • 'initial_capital' = the initial capital of the strategy
  • 'profit' = current net profit or net loss of the strategy (BF fees are deducted)
  • 'capital' = current capital of the strategy (initial_capital+profit)
  • 'liability' = current total exposure of the strategy
  • 'balance' = capital of the strategy available for betting (capital-liability)
  • 'requested_trades' = count of requested trades of the strategy
  • 'settled_trades' = count of settled trades of the strategy
  • 'winning_trades' = count of winning trades of the strategy
  • 'today_trades' = count of today settled trades of the strategy
  • 'today_winning_trades' = count of today winning settled trades of the strategy
  • 'today_profit' = today net profit or net loss of the strategy (BF fees are deducted)
  • 'winning_trades_row' = count of current winning trades in a row of the strategy
  • 'losing_trades_row' = count of current losing trades in a row of the strategy
  • 'winning_reset_row' = count of current winning reset in a row of the strategy
  • 'losing_reset_row' = count of current losing reset in a row of the strategy
  • 'min_since_last_trade' = minutes elapsed since last trade of the strategy
  • 'id_horse_last_trade' = Id of the runner played in the last trade of the strategy
  • 'id_race_last_trade' = Id of the market played in the last trade of the strategy
  • 'id_horse_last_trade' = Id of the runner played in the last trade of the strategy
  • 'is_last_bet_partially_matched' = ruturns 1 if the last settled bet was partially matched
  • 'last_bet_profit' = returns the net gross profit (including Betfair fees) of the last settled bet

Example:

<place 	condition="(@is_horse_selected=1)
   and (dbo.fn_strategyproperty(@id_strategy,'today_profit')>-20)"
price="@best_back_price"
size="2" />

place a bet if the horse is selected and if the strategy has a today profit&loss greater than -20