Moving on.

I stopped trading last year after seeing the small profits disappear and not spending any time with the bot. My interest is in programming and as I moved from VBA to .NET and the wonders of Visual Studio, I was more interested in app development than raking over market data.

I decided to stop the bot and shut down the VPS, pointless spending money on something I no longer enjoyed.

Thanks to all those who visited and contributed to this site.

Happy trading and keep it fun ūüôā

What’s going on?

[I started this post last week and now I think I’ve solved the problem, but as I’ve written it, you can read it. solution at bottom.]

Over the past two weeks, Oscar, my UK dogs bot, has had six markets failing to trade out or green up. After the first two, I stopped for two days whilst I got round to checking the code but everything was fine, as it should be as I hadn’t changed anything. I restarted and after another few days of trading ok, it happened again, so it’s now stopped. I can’t see anything particular about the markets it’s happening on, and the connection from my VPS appears good. I’m now thinking of adding some extra code to record more details in hope of catching what’s going on.

I’m less narked than you may think as the result so far is I’m up ¬£40 from the errors. But obviously I can’t let it carry on.

In other news, I’ve been reading. A challenging task for someone who flits from one thing to another. Anyway, this had lead to some really good coding sessions (from my point of view) but nothing live yet, only recording and paper trading.

I put quite a bit of time into code that aims to measure the chance of being matched after a trigger is reached and over what period that match would take place. Recording price movement is pretty easy and amount matched over a short period in one direction is also simple. But tracking price, piq and amount matched if the price moves against and then returns, then goes positive, before returning against, is a job for good code. (I’ve not had it marked yet, so no conclusions.)

And I’ve just put on test some code for showing which runner has won on inplay markets. My aim is to know the winner straight away and not have to have a separate process. I have some old code that would take my bets sheet (paper trades) and check it against the RP results page (by runner) after all the races were finished but it requires random fettling to keep up with the website changes. I haven’t used it for some time. It also only happened once a day. My new code works with obvious winners, reaching and staying at 1.01, but then handles close calls individually, with unknowns highlighted for my attention at the moment (this still requires input from me but I’m not checking through every market). I get a rolling update from this.

Inplay is not something I’ve botted with any interest before. But a post on the Gruss forum caught my attention. It regards a simple strategy shown in a YouTube video. It got my interest in the inplay side of things. Rather than throwing bets in and seeing what happens, I thought I’d approach this with a plan and code my way to results rather than bet my way there. If the testing comes to nothing, no waste, I’ve got some cracking reusable code.

[SOLVED, I think]

As mentioned at the top, I think I’ve found the problem.

It’s a time issue. My server clock was 33.7 seconds behind. You can find this out by going to the website – (My laptop is 0.8s out.) UK dogs are quite sharp with suspending, 30secs+ could easily miss my greening period.

A simple fix? No. Why would it be? Multiple tries at pointing my desktop clock to various internet ntp clocks resulted in a 0.1 second increase in error (huh). I Googled around and found an article on Dimension 4. Downloaded it. This took a few attempts with different servers and then bingo! Back to for an exact result. Bot restarted. Time will tell (time, it’s a time pun, ha ha).


Outsourcing theft

Seamus asked –

How does using a VPS affect your risk of hackers stealing your strategies?

The main risk from using a VPS is not from hackers but from an insider ie an¬† employee of the VPS provider. Some random could target the VPS provider but I’d guess there’s more valuable data than my penny bot.

There are steps to take to improve security. Google “setting up a VPS” for some tips. Also password protect excel code. This is weak but combined with an event handler that clears certain settings on close and open events would render the bot useless. As with all things, if someone really wants it they’ll get it, whether that’s hacking your home pc, your VPS or smashing your back door in and legging it with your computer.

If you’ve got a very profitable bot then I don’t see any need to move to a VPS, you’re already winning. If, like me, your main point when people ask “how’s the betting going?” is to say “well, I don’t lose”, then move to a vps, save money on the electric bill and have less connection-loss, enjoy the feeling of playing in the big league and don’t worry about someone twoc-ing your ok bot.


Negapo and Captain Sensible¬†commented/discussed over on the Gruss forum (click here to have a look) referring back to my discussion with Steve that started here. It’s about value and where we find value. Both discussions are interesting. Here’s how I see value and what it means to my bot.

True value

The true value (true odds/true price/etc) of any horse/dog/yacht¬†can never be known before the event. The fact is a horse will either win or lose (except in a dead heat but let’s ignore that for now). The closest thing we have to true value is the starting price (SP). If you were to back (on Betfair) every favourite horse at it’s SP, I’d expect you would be on average around break-even, having winning/losing runs, but nothing consistent (your wallet would decrease due to commission paid). If this was not the case and SPs were always overpriced for example, then this would be known and people would exploit them, which in turn would effect change on the SPs, pressuring them towards true value, therefore making the SP near to true value. It’s a system constantly being balanced by it’s participants (the crowd).

Value bet

You’ll never know the true value of a single runner. You have your views though and decide that dog number two in the 15:35 has a true value of 4.0, the market is currently at 5.0, you back it with a stake of ¬£10. It wins. Were you right or wrong to price it at 4.0?¬† Again, you’ll never know, not on that one outcome. After the win, and after the fact, the true value was 1.0, because it won. In the unlikely event that you always pick winners, not one loser, then stop reading this, you are unique and very rich (or you’re trying to sell something). You’d also be able to say the true value of any of your selections is 1.0, because they always win. In all other scenarios though, you’ll know if you’re finding value bets because you’ll be making profit in the long term. If you repeatedly back at 5.0 when the true value is 4.0, you’ll see it in your results. You wont win every bet, but you’ll be on the right side making profit.

Value trade

Finding value when trading is, or can be, different. Making profit will mean at least one bet in a trade is at value but this just has to be, as you’ll be making that trade across, or on one side of, true value, with both a back and lay position. I find it easier to explain this using some excellent graphics indicating back and lay points.

The trade in the image below, with respect to outcome, the lay bet is at value, the back bet isn’t. The result is profit.


The trade in the image below, with respect to outcome, the back bet is at value, the lay bet isn’t. The result is profit.


The trade in the image below, with respect to outcome, both the back and lay bet are at value. The result is profit.

The trade in the image below, with respect to outcome, the lay bet is at value, the back bet isn’t. The result is loss.


The trade in the image below, with respect to outcome, the back bet is at value, the lay bet isn’t. The result is loss.


The trade in the image below, with respect to outcome, both the back and lay bet are not at value. The result is loss.


From these professional quality graphics we can see two things for sure –

  1. If both back and lay bets are at value then you have a profit.
  2. If both back and lay bets are not at value then you have a loss.

In the other masterfully created images where one bet is at value and the other isn’t, it is the relative price of the back and lay that determines profit or loss.

What’s it mean to me?

This brings us back to the point I was challenging last year regarding API crashes –¬†“Every bet you place with a bot should be sent because you believe it to be value at that time and it should be allowed to stand on it‚Äôs own merits.” – Steve.

Looking again at the first image –


If my entry point is the lay at 2.34 then not closing would leave me with a value bet. If my entry point is the back at 2.42 then not closing would leave me exposed with a less than value bet. However, I see statistical value in backing at 2.42 and I’m predicting a move to 2.34 due to market conditions, with no regard to the runner/selection/sport. I need to close the trade to profit. (These figures are for illustration, in reality I’d be expecting a move from 2.42 to 2.40, one tick only.)

I have no idea at all if my bot is entering the market at value with regards to outcome. My only concern is the short-term price movements. My bot is scalping, chasing pennies, harvesting small profit from others intended trades, jumping in the middle, whatever you want to call it. I have no care for the outcome or the sport, only the market and it’s behaviour. Therefore my requirement is to close out every time, for profit or loss, within seconds of entry. I am aware this type of trading is disliked by some, such is life.

Out of interest and in response to a comment by Captain Sensible, below is a chart of the results (P&L) of all the back entry bets placed over 6 months on the Australian horses. As can be seen I’d currently be over ¬£300 up, hitting a high of over ¬£400 and a low of around -¬£300. But there is no consistency to be relied upon here. This chart suggests to me that I’m not relying on my entry being at good value with regards to outcome. Closing all these trades resulted in a steady consistent profit.



2017 Results

Here are the numbers for 2017 –

Number of markets traded – 28,006

Number of bets settled – 167,836

Traded volume Р£852,690.97

Profit and loss Р£424.77

Return on traded volume – 0.058%

I haven’t really been bothered with it for a few months and am actually surprised with the final figures (DIY and family have had my time of late). I check in on the VPS now and again and was seeing the past few months not doing very well. The totals for 2017 are propped up by a strong start to the year (see image at bottom).

A little dig in to the numbers we can see that more markets were traded than in 2016 Рup 1231 РI did run in other events for  a couple of months or so, which accounts for about the difference. Number of bets settled were down. Traded volume was down overall by around £150,000. Average traded per settled bet dropped from £5.27 to £5.08. Return dropped to 0.050% from 0.069% with a profit for the year of £424.77. (Taking into account the costs of the bot, currently at £21/month, gives a real profit of  £172.77 and a real return on traded volume of 0.020%.)

BIG FIGURE – Traded volume since restart in 2015 is –


That’s a multi-million pound botting operation right there!

I spend more time thinking of coding than actually doing. I sat down to do some tonight but ended up sorting results and doing this post. We’ll have to see what I get up to this year but I would like to advance the current bot.

To my fellow bottors – I hope you all profit from your hard work, happy 2018.