Author Topic: Don't bet if no bet to be canceled  (Read 1317 times)

Tags:
  • All members
  • Posts: 22
Don't bet if no bet to be canceled
« on: 26 Jun 2022, 14:22 »
Hi all.

Hi have a trigger to move a lay bet that has as a condition that the checks that the number of unmatched lay bets is greater than 0 and has a 'Cancel then lay' action in which I chose the option 'Do not bet if no bets  to cancel' because I was having an issue with double lays before and then I found this option, that I thought would resolve the issue, but...

Although in the 'Program log' I get the error launched because there were no bets to be canceled the lay is still being done. Am I doing something wrong? How could I make sure there is only one bet matched?

Thanks in advance

  • All members
  • Posts: 22
Re: Don't bet if no bet to be canceled
« Reply #1 on: 28 Jun 2022, 21:54 »
As you can see here the bet being placed although there is no bet to be canceled already because it has been matched



Anyone can pitch in please? Thank you.

PS: sorry for my poor english, feel free to use the  translator from "My english" to "English"

  • All members
  • Posts: 22
Re: Don't bet if no bet to be canceled
« Reply #2 on: 28 Jun 2022, 21:55 »

  • Tim Vetrov
  • Administrator
  • Posts: 4870
  • Gender: Male
*
Re: Don't bet if no bet to be canceled
« Reply #3 on: 29 Jun 2022, 09:34 »
The error means MarketFeeder refreshes list of bets, got an unmatched one, send a command to cancel it to BetFair but during that time it's been matched, so BetFair returns an error.
Proud to be 🇺🇦
I'm happy to help Monday - Friday, 08:00-18:00 GMT
Буду рад помочь с понедельника по пятницу, 08:00-18:00 GMT

  • All members
  • Posts: 22
Re: Don't bet if no bet to be canceled
« Reply #4 on: 29 Jun 2022, 10:14 »
Thank you for your reply Tim.

I understand that is what is happening but my questions remains: Why is the second bet still being placed if I have this option activated on every "cancel then lay":



And what do I need to do to make sure that the second bet is not placed if the first was canceled in that meantime?

  • All members
  • Posts: 22
Re: Don't bet if no bet to be canceled
« Reply #5 on: 02 Jul 2022, 21:21 »
I would appreciate a reply.

What is the point of "do not bet if no bets to cancel" in a "Cancel then lay" action if, when an error occurs on the cancel part, the lay is still processed?

What am I missing, how to get around this?

Thank you.

  • Moderator
  • Posts: 3597
*
Re: Don't bet if no bet to be canceled
« Reply #6 on: 03 Jul 2022, 09:09 »
Hi
I think these problems are because the trigger has not yet received an up-to-date list of bets from the exchange. A couple of things you can try:

Check your settings for the frequency of updating the list of bets and see if speeding up the bets refresh rate improves things.

Most example triggers that bet and cancel etc. have a time delay built in to ensure enough time for an action to be registered on the exchange and the list of bets returned to MFP.

In each betting action: record now_time in a user variable e.g. last_bet_time
In each subsequent betting action add a condition:  (now_time - last_bet_time)/mf_second is equal or greater than 3

this will ensure enough time to get a fresh list of bets from Betfair before executing the next action  

Here is an example trigger where this method is used and is described in detail (towards the end)
https://marketfeeder.co.uk/learn/triggers/classic-scalping/
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

 

Please note, BetFair is seems to be currently OFFLINE