Author Topic: Problem with bet matching in test mode  (Read 1584 times)

Tags:
  • All members
  • Posts: 14
Problem with bet matching in test mode
« on: 04 Aug 2019, 19:38 »
Hi,

Bet matching in test mode does not work perfectly (not when I want to match someone else's offer, but when I wait for someone else to match mine).
You can see in the attached picture that my bet at 44 on 'Manhattan Mead' is still unmatched, although its price fell to 23 (it actually fell below 44 several times).
So could you fix this in the near future? I would like to test something.

  • All members
  • Posts: 14
Re: Problem with bet matching in test mode
« Reply #1 on: 07 Aug 2019, 18:44 »
Hi again,

There is a question at the end of this post. Could you answer it, please?

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Problem with bet matching in test mode
« Reply #2 on: 10 Aug 2019, 20:17 »
Hello!

Of course the Test Mode does not work identically to the real mode and it would not be reasonable to expect it to do so, as in real mode all the prices are supported by actual money offered by real bettors. In Test Mode the price cannot be changed because you do not influence the market by placing a real bet. Therefore, the way your bets are matched will be different: your bet can only be matched if the current price is equal or better than the price of the test bet, and it will always be matched in full.

The price of the selection may have fell below 23, but if you were not refreshing that market in MarketFeeder Pro after you placed your bet, the program had no means to know that the price had dropped, so your bet remained unmatched.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 14
Re: Problem with bet matching in test mode
« Reply #3 on: 14 Aug 2019, 10:43 »
Hi,

I am not sure I understand what you are saying, but I do think that this is a deficiency of the program, which can be fixed easily.
So let me explain it again: before starting the race I place a back bet (85), and when it gets matched I place a lay bet at around half of the price (44) and keep it in-play. But during in-play this lay bet does not get matched, although the price falls below its price several times and refresh rate is set to 0.2 seconds (but even I can see it for more than 0.2 seconds).
So in the program code, there should be something like: when the last traded price is equal or less than my lay bet's price, my bet gets matched.
This is what I am doing now: when last_traded is equal or less than my lay bet's price, I ask the program to place a 1.01 lay bet to notify me that in reality my bet would have been matched, and it does this correctly.
But the problem with this is that I have to do everything else manually, and I have 184 races and I would like to test them many times with different values (only two variables with only two different values are four cases), so I can find the best variation. It is very slow and tiring.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Problem with bet matching in test mode
« Reply #4 on: 14 Aug 2019, 20:53 »
Quote
But during in-play this lay bet does not get matched, although the price falls below its price several times

If this is the case, then please attach a screenshot demonstrating an unmatched bet in a market where the current lay price is below the price offered by the bet. This is not a normal behaviour, and so I will look into it to fix it if you provide the evidence.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 14
Re: Problem with bet matching in test mode
« Reply #5 on: 15 Aug 2019, 09:23 »
Hi,

In this sentence, I am talking about the last traded price, not the lay price, because this is at least as important. On the picture that 23 is the last traded price.
But let me explain it based on this example:
I place a 2 Euro 44 odds lay bet and wait for someone to match it. It will appear on the back side.
A second person places a 2 Euro 42 odds lay bet, which will appear one tick below mine.
Then a third person places a 4 Euro 42 odds back bet. What happens here is that first he matches my bet, then the second persons bet, so my bet is matched, but the third person's bet does not appear as lay_price, only as last_traded (lay_price can stay many ticks higher).
So you probably use lay_price <= my bet's price as the only condition for this indirect bet matching. And I think that last_traded should be there too. last_traded or lay_price (lay_price is probably also needed because there may be situations when it is lower than last_traded).

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Problem with bet matching in test mode
« Reply #6 on: 17 Aug 2019, 14:15 »
Quote
On the picture that 23 is the last traded price.

I cannot judge looking at your picture when your bet was made and when the last traded price reached the value of 23.0.

Quote
I place a 2 Euro 44 odds lay bet and wait for someone to match it. It will appear on the back side.
A second person places a 2 Euro 42 odds lay bet, which will appear one tick below mine.

That's right in real mode. In Test Mode you cannot influence the market with your test money, so your bets will not appear anywhere.

Quote
So you probably use lay_price <= my bet's price as the only condition for this indirect bet matching

No, that's not right. The logic of the test bet matching is as follows:

1. If the current price is equal or less than the price of your lay bet, your bet is matched immediately.
2. If the current price is greater than the price of your lay bet, but the last traded price is lower than the price of your bet, your bet gets matched at the last traded price.

If this is not your experience, please attach a screenshot demonstrating a market situation where the last traded price is lower than your offer at the time of taking that screenshot, and yet your bet is still unmatched.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 14
Re: Problem with bet matching in test mode
« Reply #7 on: 17 Aug 2019, 20:01 »
On this picture, you can see when last traded price is at 24, one second after it reached its lowest point (23), and my bet at 44 is still unmatched.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Problem with bet matching in test mode
« Reply #8 on: 18 Aug 2019, 20:16 »
Right, I've checked the code again and it looks like I was wrong: the program matches a test bet at the last traded price only if that last traded price is higher that the currently lay price yet lower than the price you offered (this happens if the prices jump up and down dramatically).

I am not sure that matching a bet at the last traded price is always appropriate. If there is a gap between back and lay, say, 2.0 and 15, and the last traded price is 10, then surely your test bet placed at 12 cannot be expected to be matched at 10 immediately. This is not how it works in real mode. In real mode it would be matched only if a new bet was placed at the price of 12.0 later, and if the amount of that bet was equal or greater than the amount of your unmatched bet.

Unfortunately, we don't have access to the timeline of traded bets, and anyway this would complicate the matters too much. Just accept that Test Mode is not a perfect representation of how bets are matched on BetFair and do not use it for strategies that are dependent on the exact mechanism of bet matching.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 14
Re: Problem with bet matching in test mode
« Reply #9 on: 19 Aug 2019, 11:25 »
If it is really that difficult to distinguish between last traded prices that occur before and after placing a test bet, then I can accept your explanation (but I would accept your decision anyway, it is your program, your responsibility).
So I give it up here. Thank you for taking the time.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Problem with bet matching in test mode
« Reply #10 on: 19 Aug 2019, 12:25 »
Thank you for pointing out where the program could be improved!
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

 

Please note, BetFair is seems to be currently OFFLINE