Laying an underdog that pulled ahead at In-Play
The idea is to lay a horse with initially low chances to win as soon as it pulls ahead after the race started (this also applies to any other type of sport where markets turn In-Play). What you expect is that horse to lose anyway, but the temporary drop of its price will let you lay with a minimum laibility.
For the implementation of this plan you pick the rank of the horse (its position in the list of horses sorted by their prices) which you think indicates its bad chances for winning. For example, the rank must not be less than 10 before the off (the rank of 1 belongs to the favourite). You also define the rank that the horse must drop to in order to qualify as pulling ahead, let's say, no higher than 3. As an additional condition, you may specify the price range for the lay bet.
All these factors can be adjusted in the constants inside the file.
The runner Hereford Boy gained speed for just a short period of time which gave the trigger an opportunity to lay at 5.0