Loss recoupment in several steps, backing
Back on a chosen selection to a fixed profit and recoup the loss according to the following scheme.
If the bet lost, divide the loss by a specific number (for example, 2) and add that value to the next bet's payout. For example, you backed £5 at 3.0 to get £10, but the bet lost £5. So you divide £5 by 2 and in the next two markets you back to win the target £10 plus £2.5 to compensate the loss.
If however another bet was lost before the previous loss was recovered, add the new loss to the existing one and divide it by 4 again, repeating the above steps. Thus another cycle of loss recovery will be started.
Continue this until the whole loss is recouped, or until the maximum stake size is reached, after which reverse to the original bet size.
You can edit the number of steps in the cycle, the size of the initial payout and the maximum bet size in the constants inside the file.