×
Full Guide
Quick Links

Syntax of Bet Rules & Individual commands

 
The syntax of the betting commands in Excel correlates with the global settings parameters used at the top of Bet Angel when placing a bet on the one-click screen. e.g. The are options to specify offsetting, fill or kill, batches etc.
There are also individual commands for bet cancellation, greening, and trade closure.  There are also some advanced commands for controlling Automation via Excel.
 
All commands are entered against the relevant selection in column L. e.g. L9, L11, L13 etc
 
Betting commands
 
BACK
Place a Back bet (price and stake provided by columns M & N)
LAY
Place a Lay bet (price and stake provided by columns M & N)
BACK_SP
Place a Back SP bet with no minimum price limit (stake provided by column N)
BACK_SP_LIMIT
Place a Back SP bet (minimum price and stake provided by columns M & N)
LAY_SP
Place a Lay SP bet with no maximum price limit (stake provided by column N)
LAY_SP_LIMIT
Place a Lay SP bet (maximum price and stake provided by columns M & N)
 
Optional parameters that can be appended to the betting commands
 
OFFSET:x
Apply an offset bet x ticks away
OFFSET_PERC:x.x
Apply an offset bet x.x percent away (rather than using ticks)
FILL_KILL:TRUE/FALSE
When TRUE a fill or kill delay will be applied, the number of seconds being specified by the KILL_DELAY parameter
KILL_DELAY:x
x represents the number of seconds to apply to the fill or kill routine
BATCHES:x
When offsetting, use up to x batches
STOP:x
Apply a stop trigger x ticks away (normally applies to an offset bet unless OPENING_STOP has been used)
STOP_PERC:x.x
Apply a stop trigger x.x percent away (rather than using ticks)
STOP_PLACE:x
When a stop has triggered, place the stop bet x ticks away
STOP_PLACE_PERC:x.x
When a stop has triggered, place the stop bet x.x percent away (rather than using ticks)
TRAILING_STOP:TRUE/FALSE
Specifies whether the stop should be trailing or not
WITH_GREENING:TRUE/FALSE
Specifies whether to offset with greening or not
OPENING_STOP:TRUE/FALSE
When TRUE the stop will be applied to the opening bet rather than the offset
 
Example betting command
 
The following rule will place a lay order in the market; hold it in the market for 60 seconds to wait for it to be filled. If it is not filled it will be cancelled, if it is filled it will apply ‘with greening’ to the offset order one tick above and apply a trailing stop against the order which will exit the position moves three ticks against us.
 
=LAY OFFSET:1 FILL_KILL:TRUE KILL_DELAY:60 STOP:3 TRAILING_STOP:TRUE WITH_GREENING:TRUE
 
Individual commands (columns M & N are not used)
 
CLOSE_TRADE
Close a position using net stake on this selection at the currently available price
GREEN
Close and green a position on this selection by invoking the built-in greening routine within Bet Angel.  Any profit or loss on the selection will be evenly spread across all selections.
CANCEL
Cancels an individual unmatched bet whose Betfair bet reference is held in column R for this selection
CANCEL_ALL
Cancels all bets for the selection
CANCEL_ALL_BACK
Cancels all unmatched back bets for this selection
CANCEL_ALL_LAY
Cancels all unmatched lay bets for this selection
TAKE_SP
Marks an individual unmatched bet to be matched at SP when the market turns inplay. The bet reference of the bet to be marked needs to be specified in column R for the selection.
TAKE_SP_ALL
Marks all unmatched bets of the selection to be matched at SP when the market turns inplay.
TAKE_SP_ALL_BACK
Marks all unmatched back bets of the selection to be matched at SP when the market turns inplay
TAKE_SP_ALL_LAY
Marks all unmatched lay bets of the selection to be matched at SP when the market turns inplay
KEEP
Marks an individual unmatched bet to be Kept by Betfair at times when it would normally be cancelled (e.g. when the market suspends and goes inplay). The bet reference of the bet to be kept needs to be specified in column R for the selection.
KEEP_ALL
Marks all unmatched bets of the selection to be Kept by Betfair at times when it would normally be cancelled (e.g. when the market suspends and goes inplay).
KEEP_ALL_BACK
Marks all unmatched back bets of the selection to be kept by Betfair at times when it would normally be cancelled (e.g. when the market suspends and goes inplay)
KEEP_ALL_LAY
Marks all unmatched lay bets of the selection to be kept by Betfair at times when it would normally be cancelled (e.g. when the market suspends and goes inplay)
 
 
Advanced commands to link Excel with Advanced Automation
 
SET_NOMINATED1
Sets this selection as the first Nominated selection in Guardian
CLEAR_NOMINATED1
Clears it
SET_NOMINATED2
Sets this selection as the second Nominated selection in Guardian
CLEAR_NOMINATED2
Clears it
Note: Similar commands exist for nominated columns 3 to 5
 
 
 
SET_SV FOR:<SELECTION|MARKET|EVENT> NAME:<name> VALUE:<value>
Assigns a shared stored value
CLEAR_SV FOR:<SELECTION|MARKET|EVENT> NAME:<name>
Clears a shared stored value
 
 
Notes:
 
SET_SV will normally store a numeric value, but if you want it to store Text then the value specified in the Excel command should be placed in quotes.
e.g. SET_SV FOR:SELECTION NAME:Test1 VALUE:42 NAME:Test2 VALUE:"This is text"
 
The FOR command is optional and defaults to SELECTION when used in a individual command
 
The commands can be chained together to set multiple values in one go, e.g.
 
SET_SV FOR:SELECTION NAME:Test1 VALUE:42 NAME:Test2 Value:99 NAME:Test3 Value:200
 
or
 
CLEAR_SV FOR:SELECTION NAME:Test1 NAME:Test2 NAME:Test3
 
 
As with all commands, they will be processed when the Status cell in column O is empty and will show OK / ERROR / FAILED when processing is complete.