Variables

SQL Variables dedicated to the Exchange Betting

Ipposnif variables contain information about the markets, the runners and more. They can be used in SQL Expressions and SQL Assertions of the strategies.

Most of the variables can be used directly, for example @capital contains the current capital of the strategy (initial capital+profit), and can be used, for example, to specify the size of the next bet:
@capital/100
Instead, Index Variables are tipically used as parameters passed to functions.
dbo.fn_HorseProperty(@id_horse, 'official_rating') > 99
All the Ipposnif variables are read mode only: they can be read from a strategy, but they cannot be overwritten.
You can know the value of a variable or SQL expression using Expression Watcher.

Index Variables

Market Variables

Runner Variables

Trade Variables

User Variables

Strategy Variables

 


@active_markets

Type: Integer
Description: Count of active markets for the current strategy. A market is considered active when it has bets not yet settled. It includes also the market where the strategy is going to place the next bet, so the value returned is always >= 1
Example: The bet size is 10 if there are currently less than 3 markets with open bets (in the strategy where this variable is used), otherwise the stake is only 5.
CASE WHEN @active_markets < 3 THEN 10 ELSE 5 END
 


@balance

Type: Decimal
Description: Betfair balance of the user (money available for betting). This value is taken directly from Betfair.
Example: If the balance falls below 100 stop placing bets (a size of zero means no bet), otherwise use a size of 5 for the next bet.
case when @balance < 100 then 0 else 5 end
 


@base_rate

Type: Decimal
Description: Betfair market base rate percentage. It is the percentage (before the discount rate is applied) paid to Betfair on the winnings. In the main screen of the program, it is shown close to the Hedge Button.
Example: Place bets only on markets that have a Base Rate lower than 7%.
@base_rate < 7
This variable is used in the strategies:
Auto - Outsiders LAY
 


@best_back_price

Type: Decimal
Description: Best BACK price of the runner processed at that moment. To get the BACK prices from other positions use the function dbo.fn_GetPrice.
Example: Place bets only on runners with a best BACK price between 2.2 and 3.2
@best_back_price between 2.2 and 3.2
This variable is used in the strategies:
Auto - InPlay - Value Is The Master, Auto - Outsiders LAY, Auto - Scalping BACK WOM, Auto - Yankee*5 Place/Win BACK, Manual - LAY Insured Check, Manual - LAY Insured Input, Manual - Scalping, Schedule - LAY The Draw, Tips - LAY Trading
 


@best_lay_price

Type: Decimal
Description: Best LAY price of the runner processed at that moment. To get the LAY prices from other positions use the function dbo.fn_GetPrice.
Example: Place bets only on runners with a best LAY price between 2.2 and 3.2
@best_lay_price between 2.2 and 3.2
This variable is used in the strategies:
Auto - Outsiders LAY, Auto - Scalping BACK WOM, Manual - Scalping, Tips - Masa LAY 3-4@5
 


@bet_price

Type: Decimal
Description: Returns the price of the current bet in the current strategy. it is normally passed as parameter to progression functions.
Example:
dbo.fn_alembertsize(@id_strategy, (@initial_capital/50), @bet_price, @bid_type)
This variable is used in the strategies:
Auto - D'Alembert BACK
 


@bf_market_id

Type: String
Description: Betfair market ID. It can be useful to integrate Ipposnif with external services.
 


@bf_order_index

Type: Integer
Description: Betfair ordinal position of the runner.
Example: Place bets only on runners at the first position in the Betfair order.
@bf_order_index=1
 


@bf_selection_id

Type: String
Description: Betfair selection ID. It can be useful to integrate Ipposnif with external services.
 


@bfliability

Type: Decimal
Description: Betfair liability of the user (total risked money). It is the sum of the liability of all the Ipposnif strategies, plus the bets placed outside Ipposnif. This value is taken directly from Betfair.
Example: Place bets only if the current liability is lower than 100.
@bfliability < 100
 


@bid_type

Type: String
Description: Returns the Bid Type entered by the user in the strategy for the current bet. 'b'=BACK 'l'=LAY. It is normally passed as parameter to functions.
Example:
dbo.fn_alembertsize(@id_strategy, (@initial_capital/50), @bet_price, @bid_type)
This variable is used in the strategies:
Auto - D'Alembert BACK, Auto - Masaniello BACK 5-8@4, Auto - Masaniello BACK 2-15@4 Accumulator, Manual - Scalping, Schedule - Masaniello BACK 2-8@6 CS
 


@bsp

Type: Decimal
Description: Betfair Starting Price. It is available only after the market goes-in-play and the BSP conciliation has taken place.
Example: Place bets only if the BSP is greater than 9.
@bsp > 9
 


@capital

Type: Decimal
Description: Current capital of the strategy (initial capital+profit).
Example: Returns a value equal to 1% of the strategy's current capital.
@capital/100
This variable is used in the strategies:
Auto - BACK The Favourite, Auto - Chase Losses BACK, Auto - Chase Losses LAY, Auto - D'Alembert BACK, Auto - Masaniello BACK 5-8@4, Auto - Masaniello BACK 2-15@4 Accumulator, Auto - Forecasts 5-6-7, Auto - InPlay - Crazy Finish, Auto - Outsiders LAY, Manual - LAY The Field, Schedule - BACK My Selections, Schedule - BACK Red Flags, Schedule - LAY Blue Flags, Schedule - Multiple BACK, Schedule - Multiple LAY, Tips - BACK Decimal Fibonacci, Tips - LAY Trading
 


@competition

Type: String
Description: Name of the competition. It is one of the columns shown in the event list (main window).
Example: Place bets only on the Scottish Championship.
@competition = 'Scottish Championship'
 


@country_code

Type: String
Description: Two chars ISO code of the country of the event. Read the full list of country codes
Example: Place bets only USA or South Africa events.
@country_code in ('us','za')
 


@days_since_last_run

Type: Integer
Description: Days elapsed from the last race of the runner.
 


@discounted_base_rate

Type: Decimal
Description: Betfair market base rate deducted of the player percentage discount.
 


@distance

Type: Integer
Description: Returns the distance of the race in meters.
Example: Place bets only on races with a distance between 1400 and 2800 meters.
@distance BETWEEN 1400 AND 2800
 


@draw_price

Type: Decimal
Description: Price of the horse at which a bet with size @draw_size will hedge the current trade.
 


@draw_size

Type: Decimal
Description: It is used normally with bet of bid type * that means if the size is positive create a bet of type back, if the size is negative create a bet of type lay.
 


@edge_price

Type: Decimal
Description: Best price of the horse queried in that moment: back price if the bet will be of type Back, best lay price if the bet will be of type Lay.
It is used normally with bet of bid type * that means if the size of the bet is positive create a bet of type back, if the size is negative create a bet of type lay.
 


@edge_size

Type: Integer
Description: Size of the bet that edges the current trade.
It is used normally with bet of bid type * that means if the size is positive create a bet of type back, if the size is negative create a bet of type lay.
 


@entry_bet_matched_size

Type: Decimal
Description: Matched size of the bet with index 1 in the current trade.
 


@event_name

Type: String
Description: Contains the name of the event.
Example: Place bets only on markets related to the event 'chelsea v wolves'.
@event_name = 'chelsea v wolves'
 


@event_type

Type: String
Description: Type of the event, basically it is the name of the sport. This variable is useful when Ipposnif is configured to download events of two or more sports.
The possible event types are: Soccer, Tennis, Golf, Cricket, Rugby Union, Rugby League, Boxing, Horse Racing, Motor Sport, E-Sports, Bowls, Special Bets, Volleyball, Cycling, Chess, Athletics, Snooker, Financial Bets, American Football, Baseball, Winter Sports, Basketball, Ice Hockey, Australian Rules, Handball, Darts, Mixed Martial Arts, Greyhound Racing, Politics, Pool.
Example: Place bets only on greyhound races.
@event_type = 'Greyhound Racing'
 


@fees

Type: Decimal
Description: Factor that multiplied for a win amount gives the amount of fees paid to Betfair from this eventual win on the current race. It includes the Market Base Rate and the user Discount Rate. For example in case of a winning bet of 100, if @fees is equal to 0.048, the fees paid to Betfair will be 4.8.
Example: Can be used to include into the size of a bet the fees paid to Betfair.
2*(1+@fees)
This variable is used in the strategies:
Auto - Chase Losses BACK, Auto - Chase Losses LAY
 


@flag

Type: Integer
Description: Color of the flag attached to the runner: 0=none flag 1=red flag 2=blue flag.
Example: Place a bet on all the runner with an attached red flag.
@flag=1
 


@form

Type: String
Description: Form of the horse.
Example: Place a bet on horses that have won at least one race.
@form like '%1%'
Example: Place a bet on horses that have won the last race.
@form like '%1'
Example: Place a bet on horses with a form containing at least five results and that haven't won a race.
LEN(@form) > 4 AND @form NOT LIKE '%1%'
This variable is used in the strategies:
Auto - BACK The Favourite
 


@global_0[1-8]

Type: Decimal
Description: Eight global values that can be entered in the options. These values are shared between all the strategies and can be useful, for example, to set a multiplier for the size of the bets.
Example:
@global_01
This variable is used in the strategies:
Auto - Yankee*5 Place/Win BACK
 


@historical_net_profit

Type: Decimal
Description: Net profit and loss for all the rounds (resets) performed by the strategy.
 


@horse_name

Type: String
Description: Name of the runner. Depending by the event type it can be the name of a horse, the name of a footbal team, a Tennis player and so on.
Example: Place a bet on every runner with a name that starts with an i (SQL used by Ipposnif is not case sensitive).
@horse_name like 'i%'
This variable is used in the strategies:
Auto - Forecasts 5-6-7
 


@horse_note

Type: String
Description: Runner notes inserted by the user.
Example: Place a bet on every runner with a note containing the word lead.
@horse_note like '%lead%'
 


@id_favourite_[1-6]

Type: Integer
Description: Id of the runner, in the race processed at that moment, with the [first-sixth] lowest price.
Example: Place bets only on the first favourite.
@id_horse=@id_favourite_1
Example: Place bets only on races in which the favorite has the best BACK price greater than 2.
dbo.fn_RaceHorseProperty(@id_race,@id_favourite_1, 'back_prices', 1) > 2
This variable is used in the strategies:
Auto - BACK The Favourite, Auto - Chase Losses BACK, Auto - Chase Losses LAY, Auto - InPlay - Value Is The Master
 


@id_horse

Type: Integer
Description: Id of the runner processed at that moment.
Example: Place bets only on the first favourite.
@id_horse=@id_favourite_1
This variable is used in the strategies:
Auto - BACK The Favourite, Auto - Chase Losses BACK, Auto - Chase Losses LAY, Auto - InPlay - LAY Slow Runners, Auto - InPlay - Value Is The Master, Auto - Scalping BACK WOM, Auto - Yankee*5 Place/Win BACK, Manual - Dutching BACK, Tips - BACK Decimal Fibonacci, Tips - BACK Yankee*4 Win, Tips - LAY, Tips - Masa LAY 3-4@5, Tips - LAY Trading
 


@id_race

Type: Integer
Description: Id of the market processed at that moment.
Example: Returns the count of trades, in an open or closed status, for the current strategy, for all horses, in the current race.
dbo.fn_TradeCount(@id_race, 0, @id_strategy, 'FO', 0)
This variable is used in the strategies:
Auto - Masaniello BACK 5-8@4, Auto - InPlay - LAY Slow Runners, Auto - InPlay - Value Is The Master, Auto - Scalping BACK WOM, Manual - Dutching BACK, Tips - BACK Decimal Fibonacci, Tips - BACK Yankee*4 Win, Tips - LAY, Tips - Masa LAY 3-4@5, Tips - LAY Trading
 


@id_race_next

Type: Integer
Description: ID of the next race in the same meeting for the same MarketType. If there is no next race, zero is returned.
 


@id_race_prev

Type: Integer
Description: ID of the previous market in the same meeting for the same MarketType. If there is no previous race, zero is returned.
Example: This assertion can be used to place a bet only when the favourite of the previous race has won.
dbo.fn_RaceProperty (@id_race_prev, 'favourite_by_odd', 1) 
    = dbo.fn_RaceProperty (@id_race_prev, 'id_horse_winner', 1)
 


@id_race_win

Type: Integer
Description: ID of the WIN market in the same event.
Example: Place a bet (in the PLACED market) if in the WIN market of the same race the strategy 'Auto - Yankee*5 Win BACK' has no bet, or if it has already one bet but on the same runner (from the strategy Auto - Yankee*5 Place BACK).
dbo.fn_TradeCount(@id_race_win, 0, dbo.fn_StrategyId('Auto - Yankee*5 Win BACK') , 'OF', 0) = 0
OR
dbo.fn_TradeCount(@id_race_win, @id_horse, dbo.fn_StrategyId('Auto - Yankee*5 Win BACK') , 'OF', 0) = 1
Example: On the PLACE market, bet on the runner that is the favorite on the WIN market.
@id_horse=dbo.fn_RaceProperty(@id_race_win, 'favourite_by_odd', 1)
This variable is used in the strategies:
Auto - Yankee*5 Place/Win BACK
 


@id_race_placed

Type: Integer
Description: ID of the PLACED market in the same event.

This variable is used in the strategies:
Auto - Yankee*5 Place/Win BACK
 


@id_strategy

Type: Integer
Description: ID of the strategy processed at that moment.
Example: Returns the actual exposure of the current strategy.
dbo.fn_StrategyProperty(@id_strategy, 'liability')
This variable is used in the strategies:
Auto - Chase Losses BACK, Auto - Chase Losses LAY, Auto - D'Alembert BACK, Auto - Masaniello BACK 5-8@4, Auto - Masaniello BACK 2-15@4 Accumulator, Auto - Yankee*5 Place/Win BACK, Manual - Dutching BACK, Schedule - BACK Staking Plan, Schedule - Masaniello BACK 2-8@6 CS, Tips - BACK Yankee*4 Win, Tips - Masa LAY 3-4@5, Tips - LAY Trading
 


@id_trade

Type: Integer
Description: ID of the trade processed at that moment. It is available only after the first bet of the trade is placed.
Example: Returns the profit of the current trade.
dbo.fn_TradeProperty(@id_trade, 'profit')
This variable is used in the strategies:
Auto - InPlay - Crazy Finish, Manual - LAY Insured Check, Manual - One Check DOB BACK, Manual - Scalping, Schedule - LAY The Draw, Tips - LAY Trading
 


@initial_capital

Type: Decimal
Description: Initial capital of the strategy.
Example: Stop betting when the current capital of the strategy has doubled the initial capital.
@capital < (@initial_capital*2)
This variable is used in the strategies:
Auto - BACK The Favourite, Auto - Chase Losses BACK, Auto - Chase Losses LAY, Auto - D'Alembert BACK, Auto - Masaniello BACK 5-8@4, Auto - Masaniello BACK 2-15@4 Accumulator, Auto - Forecasts 5-6-7, Auto - InPlay - LAY Slow Runners, Auto - InPlay - Value Is The Master, Auto - Scalping BACK WOM, Auto - Yankee*5 Place/Win BACK, Manual - Dutching BACK, Schedule - BACK My Selections, Schedule - BACK Staking Plan, Schedule - BACK Red Flags, Schedule - LAY Blue Flags, Schedule - LAY The Draw, Schedule - Masaniello BACK 2-8@6 CS, Schedule - Multiple BACK, Schedule - Multiple LAY, Tips - BACK Decimal Fibonacci, Tips - BACK Yankee*4 Win, Tips - LAY, Tips - Masa LAY 3-4@5
 


@input_price

Type: Decimal
Description: Returns the value inserted by the user in the column "input" of the runners grid.
To show this input column, you have to select the option "Show Price Input Frame" in the "Manual Input" section of the strategy. If in any of the SQL property of the strategy there is a reference to this variable, the column "input" is shown in the runners grid.

This variable is used in the strategies:
Manual - LAY Insured Input
 


@is_anyhorse_selected

Type: Bit
Description: If contains 0 no horse is checked in the race queried in that moment, if contains 1 at least one horse is checked.
Example: Places a bet, if at least one horse is selected in the race.
is_anyhorse_selected=1
 


@is_horse_selected

Type: Bit
Description: If contains 0, the horse is not checked, if contains 1 it is checked.
Example: Place bets only on selected runners.
@is_horse_selected=1
 


@is_event_selected

Type: Bit
Description: User can select events in the left frame of the main window, showing the column Selected. If this variable contains 0, the event has not been selected by the user, if it contains 1, the event is selected. It can be used to trig, with one single event selection, multiple strategies working on different market types.
Example: Place bets only on events selected by the user.
@is_event_selected=1
This variable is used in the strategies:
Schedule - LAY The Draw
 


@is_in_play

Type: Bit
Description: If contains 0 the race is not in play, if 1 the race is in play.
Example: Place bets only when the market is not in play.
@is_in_play=0
 


@is_market_selected

Type: Bit
Description: Returns 1 if the market has been manually selected by the user. Otherwise it returns zero.
To show the market checkbox (top-right of the main screen) you have to select the option "Market Checkbox" in the "Manual Input" section of the strategy.

This variable is used in the strategies:
Manual - Dutching BACK
 


@is_previous_matched_bet_present

Type: Bit
Description: Returns 1 if on the same market, for the same strategy, there is a previous matched bet on a different runner. Otherwise it returns zero.

 


@jockey_name

Type: String
Description: Contains the jockey name of the horse.
Example: Place bets only on horses ridden by Andrea Atzeni.
@jockey_name = 'Andrea Atzeni'
 


@last_check_bet_seconds

Type: Integer
Description: Returns the number of seconds elapsed from the last status change of the previous bet of the same strategy. If there isn't a previous bet in the strategy, -1 is returned. This variable can be useful to prevent a new bet placement for a certain number of seconds from the last bet settlement, allowing an eventual reset condition to be processed before. Reset conditions are checked asyncronously every 15 seconds.
Example: Place the bet only if it is the first one or more than 30 seconds are elapsed since the last bet settlement in the same strategy. This condition should be inserted in the "Bet Trigger Condition".
(@last_check_bet_seconds =-1 OR @last_check_bet_seconds >30)
This variable is used in the strategies:
Schedule - Multiple BACK, Schedule - Multiple LAY
 


@last_reset_historical_profit

Type: Decimal
Description: Returns the historical net profit of the strategy at the moment of the last reset. If there was no previous reset, zero is returned.
Example: The initial capital is 1 unit plus 50% of the eventual historical profit of the strategy.
1 + case when @last_reset_historical_profit < 0 then 0 else @last_reset_historical_profit/2 end
This variable is used in the strategies:
Auto - Masaniello BACK 2-15@4 Accumulator, Auto - Yankee*5 Place/Win BACK, Tips - BACK Yankee*4 Win, Tips - Masa LAY 3-4@5
 


@last_unsettled_trade_profit

Type: Decimal
Description: Returns the net hedge profit of the last open (unsettled) trade. This can be useful if you want to stop betting on a horse if the last trade on it was closed in loss (or in win).
 


@lp_place

Type: Decimal
Description: Returns the last price of the current horse in the market type 'PLACE'. This variable is used normally to get the PLACE price from other market types (for example from the WIN market type).
This variable works only with Horse Racing and greyhound Racing event types.
 


@lp_win

Type: Decimal
Description: Returns the last price of the current horse in the market type 'WIN'. This variable is used normally to get the WIN price from other market types (for example from the PLACE market type).
This variable works only with Horse Racing and greyhound Racing event types.
 


@manual_input_price

Type: Decimal
Description: Returns the price inserted by the user. The strategy's criteria 'Price/Size Controls' must be set to 'Show Betting Frames'. Instead, if the criteria is set to 'Single Click Price Selection', the variable returns the price of the clicked cell.

This variable is used in the strategies:
Manual - One Click Bet
 


@manual_input_size

Type: Decimal
Description: Returns the size inserted by the user. If the user places a BACK bet the value is positive, if LAY the value is negative. The strategy's criteria 'Price/Size Controls' must be set to 'Show Betting Frames'.

This variable is used in the strategies:
Manual - Scalping
 


@market_losing_trades

Type: Integer
Description: Count of trades with a negative P&L in the market for the same strategy.
 


@market_matched_trades

Type: Integer
Description: Count of trades with status Finished in the market for the same strategy.
 


@market_name

Type: String
Description: Contains the name of the market. The content can vary from sport to sport, from market type to market type.
For example in horse racing WIN markets it contains the distance of the race and other info.
It is a column of the main window of the program, left frame.
Example: Place bets only races with a distance of six furlongs.
@market_name like '%6f%'
Place bets only on Chase races
@market_name like '%chs%'
Place bets excluding Trot and Pace races.
@market_name NOT LIKE '%trot%' AND @market_name NOT LIKE '%pace%'
 


@market_profit

Type: Decimal
Description: Net profit of the market for the same strategy.
 


@market_tot_trades

Type: Integer
Description: Count of trades in the market for the same strategy.
 


@market_type

Type: String
Description: Type of the market. An event (for ex. a horse race) can have multiple markets each one of different type (for ex. WIN, PLACE, REV_FORECAST).
Example: Place bets only on WIN type markets.
@market_type = 'WIN'
Auto - Forecasts 5-6-7  


@market_winning_trades

Type: Integer
Description: Count of trades with a positive P&L in the market for the same strategy.
 


@matched_size

Type: Decimal
Description: Total amount matched of the bet where this variable is used.
 


@max_matched_price

Type: Decimal
Description: Maximum price matched for the runner before the race went in play.
 


@min_matched_price

Type: Decimal
Description: Minimum price matched for the runner before the race went in play.
 


@nbet

Type: Integer
Description: Ordinal position, in the trade, of the bet checked at that moment.
Example: Returns the second elapsed since the placement of the current bet of the current trade.
dbo.datediff(second, dbo.fn_BetDateTime(@id_trade, @nbet, 'place'), getdate())
 


@number

Type: Integer
Description: Runner number.
Example: Place bets only on runners with number 1.
@number=1
 


@number_of_winners

Type: Integer
Description: Number of winners for the current market. Most of the markets have only one winner, but there are cases (like horse racing Place markets) in which there are more than one.
 


@original_price

Type: Decimal
Description: Returns the original price of the current bet (before it is eventually updated by the strategy).
 


@original_size

Type: Decimal
Description: Returns the original size of the current bet (before it is eventually updated by the strategy)
 


@overround_back

Type: Decimal
Description: Contains the overround back percentage of the market. More it is close to 100 more the back prices are fair.
This variable is used in the strategies:
Tips - LAY Trading
 


@overround_lay

Type: Decimal
Description: Contains the overround lay percentage of the market. More it is close to 100 more the back prices are fair.
 


@owner_name

Type: String
Description: Contains the owner name of the horse.
 


@position_[min]

Type: Integer
Description: Return the position in the list of runners ordered by price, at fixed intervals at the start of the event. 1 means that the horse was the one with the lowest odd (favourite), 2 means second favourite, etc.. The available intervals [min] are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 30, 60, 120, 180.
If the position is not yet present, the variable returns null.
 


@price_[min]

Type: Decimal
Description: Return the price at fixed intervals at the start of the event. The available intervals [min] are 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 30, 60, 120, 180.
If the price is not yet present, the variable returns null.
Example: Returns the difference in tips between the current best back price and the price at two minutes at the start. If the price is not yet present (Null), it is converted to the same value of the best back price, producing a difference of zero ticks.
dbo.fn_PercDiff(@best_back_price, isnull(@price_2, @best_back_price))
 


@profit

Type: Integer
Description: Expected hedge profit and loss of the current horse.
 


@racecourse

Type: String
Description: Contains the code of the racecourse of the race.
Example: Place bets only on Lingfield markets.
@racecourse='Lingfield'
 


@rating

Type: Integer
Description: Contains the rating points of the runner. It is available only for some event types (like for ex. GB Horse Races).
 


@return

Type: Decimal
Description: Expected profit and loss of the strategy in case the horse wins. Only matched bets are included.
 


@sex

Type: String
Description: Returns the sex of the horse in a string of one character.
  • C = A male under five years old is called a Colt.
  • H = A male that turns five becomes a Horse.
  • G = A male that is castrated is called a Gelding.
  • F = A female under five years old is called a Filly.
  • M = A female that turns five becomes a Mare.
Example: Place bets only on fillies and mares.
@sex IN ('F','M')
 


@runner_tam

Type: Decimal
Description: Total amount matched on the runner.
Example: Returns the ratio between the total amount matched on a horse and the total amount matched in the market.
@runner_tam/@tam
This variable is used in the strategies:
Auto - BACK The Favourite
 


@runners

Type: Integer
Description: Count of the runners of the race. Retired horses are excluded.
 


@seconds_to_the_start

Type: Integer
Description: Number of remaining seconds at the start of the event.

This variable is used in the strategies:
Auto - InPlay - Value Is The Master, Tips - LAY Trading
 


@stall_number

Type: Integer
Description: Stall_number number of the runner.
 


@start_price

Type: Decimal
Description: Last matched price before the market went in play.
 


@tam

Type: Decimal
Description: Total amount matched in the market.
Example: Returns the ratio between the total amount matched on a horse and the total amount matched in the market.
@runner_tam/@tam
This variable is used in the strategies:
Auto - BACK The Favourite
 


@trade_profit

Type: Decimal
Description: Contains the actual profit&loss of the current trade.
Example: If the loss of the current trade is greater than 2, perform some actions (like placing an hedge bet).
@trade_profit < -2
 


@trainer_name

Type: String
Description: Contains the name of the trainer of the horse.
Example: Place bets only on horses trained by Richard Hannon.
@trainer_name = 'Richard Hannon'
 


@turned_in_play_enabled

Type: Bit
Description: Returns 1 if the market will go in-play, otherwise returns 0..
Example: If the market will go in-play the bet size is 10, otherwise it is 2.
case when @turned_in_play_enabled=1 then 10 else 2 end
 


@weight

Type: Integer
Description: Weight assigned to the horse. In default it is expressed in pounds. You can switch to kilograms from the options.
 


@worst

Type: Decimal
Description: Expected profit and loss of the strategy in case the horse wins. Matched and unmatched bets are included.
 


@yob

Type: Integer
Description: Contains the year of birth of the horse in the format yyyy
Example: Place bets only on two years old horses.
(datepart(year,getutcdate())-@yob)=2