The classic scalping in markets with a wide price gap

Description

This is a classic scalping example for two scenarios:

1. Backing then Laying.

Back at the current lay price minus X ticks. As the bet starts to get matched (either all of it or parts of the bet), green up at Y ticks' profit, i.e. lay at Y ticks lower than the price of the back bet. If the market prices move either up or down, reposition the unmatched back bet at the new best lay price minus X ticks.

2. Laying then Backing.

Lay at the current back price plus X ticks. As the bet starts to get matched (either all of it or parts of the bet), green up at Y ticks' profit, i.e. back at Y ticks higher than the price of the lay bet. If the market prices move either up or down, reposition the unmatched lay bet at the new best back price plus X ticks.

For both scenarios: at a certain time before the off, cancel all unmatched bets and trade out all open bets at the current best prices.

Well before the start of an event, e.g. a horse race, there is a wide gap (difference) between the back and lay prices of selections. With time, the gap begins to narrow as bettors accept each other's offers. The scalping method aims to place bets as close to the current best price as possible, in the hopes that your bet will be matched first, and at a lucrative price. Basically, you aim to back at nearly the lay price or lay at nearly the back price and green up later.

Note: you can't run both scenarios at the same time, because if both back and lay bets are placed on a selection simultaneously, the triggers will get confused as to which of those bets are the initial ones and which are the green-up ones, so they might start to cancel and re-place green-up bets unnecessarily.

Disable one of the trigger blocks in favour of the other or add conditions that explicitly rule out that both scenarios place bets on the same selections. For example, you can let the "Backing then laying" block be applied to the first three favourites, and the "Laying then backing" block to all other selections.

Triggers

Download the trigger file

You will find several constants in the file to adjust the triggers:

mins_before_start When to start betting, minutes before the off
min_gap Minimum price gap (in ticks)
bet_size Initial bet size for back and lay bets
greenup_tcks Number of ticks for a green-up
offset_tcks Number of ticks to offset the initial price. When you are backing first, this will be the number of ticks to offset against the current lay price. When you are laying first, this will be the number of ticks to offset against the current back price.
close_secs When to trade out all unmatched bets, seconds before the off.
min_rank_back Minimum selection rank for backing
max_rank_back Maximum selection rank for backing
min_rank_lay Minimum selection rank for laying
max_rank_lay Maximum selection rank for laying

The first condition in the backing and laying triggers is a stub, i.e. you can replace it with your own conditions or selection filters. Make sure you add them at the right place without disrupting the logic of the triggers. Here is where to press to add new conditions:

How to add conditions

How it works

Here is the demonstration of what I mean for Scenario 1. The triggers for Scenario 2 work in an identical way, only the first bet to place is Lay. The number of selections on which you can bet simultaneously is not limited, i.e. you can place bets on multiple selections at the same time.

The initial back bet

This is what happens as soon as part of the bet is matched and the market prices have moved away from the initial position:

After part of the bet is matched

At the specified number of seconds before the off, the triggers leave no unmatched or open bets in the market:

Right before the start of the race

In a bid to learn how triggers work in general, let's look at one of the triggers here, "first backing", which places an opening back bet aiming to green it up later.

The trigger is set to be repeated no more often than once in 2 sec, and it has two actions:

  1. cancel then back. The Price is set to r_ticks(lay_price, -offset_tcks). Here, r_ticks is a function that adds the specified number of ticks in the second argument to the price in the first argument. We have lay_price for the selection's lay price (internal variable) and offset_ticks for the number of ticks (a constant we defined in the triggers header). In other words, we back at the price that is offset_ticks lower than the selection's lay price.

    The Amount of the bet is bet_size - back_matched. Here, bet_size is a constant for the initial size of bet, and back_matched is the total amount of your matched back bets on this selection. Why not just use bet_size? Because we intend to be re-posting our bet at a new price once the market moves up or down. Some part of the bet can be matched at any time, and the rest of it may remain unmatched. To avoid placing the same amount over and over, we must deduct the amount that has been already matched.

  2. set user variable. We need this action to safely loop the trigger. It writes the current time into the variable last_bl_time. Next time the trigger repeats its action, it will make sure to wait for several seconds since last_bl_time, otherwise we risk producing a bunch of duplicate bets we don't need.

Let's open the trigger's conditions.

First comes a condition block. You probably remember that a block contains several conditions or nested condition blocks that are connected with an identical logical operator, such as "AND" or "OR."

OR

Second part of the conditions:

This is just one trigger out of the multitude that can be created to fulfill betting strategies. Yet even breaking down one trigger into simple pieces gives you more clarity on how to approach common problems in online betting. Don't shy away from experimenting with the conditions on your own, play around with constants and check what come out of it.

For a safe testing environment without the risk for your account to be blocked by BetFair, use Time Machine.

If you have not heard of BetFair yet or do not have an account, register today and get £20 free. Use the link below:
New customers only, bet up to €/£20 on the Exchange and if your first bet loses, we’ll refund you €/£20 in Cash. Bet must be placed in first 7 days of account opening. T&Cs apply.
Gamble responsibly! Always be aware that betting is NOT risk-free. You must be 18+ years old before you try gambling, but even as an adult, withhold from spending money in an ill-judged manner. Our company does not encourage you to prefer gambling over other meaningful activities. If gambling is affecting your life or the lives of people close to you, please contact GamCare
 
© 2005-2024 WellDone Creative Software. All rights reserved. Terms and conditions.
BetFair® and the BetFair Logo are registered trade marks of Flutter Entertainment plc. Gamble responsibly.