The classic scalping in markets with a wide price gap
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.
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 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.
This is what happens as soon as part of the bet is matched and the market prices have moved away from the initial position:
At the specified number of seconds before the off, the triggers leave no unmatched or open bets in the market: