Author Topic: Formula for delay in-play  (Read 2634 times)

Tags:
  • All members
  • Posts: 53
Formula for delay in-play
« on: 05 Jul 2021, 13:12 »
Hi all,

I wonder if there is any way for the marketfeeder to check what the delay in-play is for the loaded markets. I would like my trigger to fire when delay in-play is 5 or 7 seconds but not when 9 or 12. Could anyone help me with that?

Best,

LiAlH4

  • Tim Vetrov
  • Administrator
  • Posts: 4870
  • Gender: Male
*
Re: Formula for delay in-play
« Reply #1 on: 06 Jul 2021, 07:07 »
Hello,

Nope, there is no such trigger variable yet.
Our developers promise to add it to next release.
Thank you.
Proud to be 🇺🇦
I'm happy to help Monday - Friday, 08:00-18:00 GMT
Буду рад помочь с понедельника по пятницу, 08:00-18:00 GMT

  • All members
  • Posts: 53
Re: Formula for delay in-play
« Reply #2 on: 16 Aug 2021, 14:34 »
Since it's been a while, does anyone know when the next update is planned to be released? I bought a 3 month subscription and I am kinda wasting it since it is not being used.

thanks!

  • All members
  • Posts: 53
Re: Formula for delay in-play
« Reply #3 on: 06 Feb 2022, 18:34 »
It has been over half a year and the vision of this variable missing in the next release is giving me nightmares. Could anyone please confirm it will be added and when the next release is expected? Thank you

  • Tim Vetrov
  • Administrator
  • Posts: 4870
  • Gender: Male
*
Re: Formula for delay in-play
« Reply #4 on: 06 Feb 2022, 18:35 »
It's almost done. Writing/translating help file sections for new awesome features.
Proud to be 🇺🇦
I'm happy to help Monday - Friday, 08:00-18:00 GMT
Буду рад помочь с понедельника по пятницу, 08:00-18:00 GMT

  • All members
  • Posts: 53
Re: Formula for delay in-play
« Reply #5 on: 11 Feb 2022, 22:41 »
Thank you, Tim. I just downloaded the new version and looked through the market variables but could not find it. Is it not listed yet in the program?

Best,

LiAlH4

  • Tim Vetrov
  • Administrator
  • Posts: 4870
  • Gender: Male
*
Re: Formula for delay in-play
« Reply #6 on: 12 Feb 2022, 10:17 »
Oops, looks like they didn't add it. Sorry.
Proud to be 🇺🇦
I'm happy to help Monday - Friday, 08:00-18:00 GMT
Буду рад помочь с понедельника по пятницу, 08:00-18:00 GMT

  • All members
  • Posts: 53
Re: Formula for delay in-play
« Reply #7 on: 13 Feb 2022, 11:25 »
Ok, Tim. 

It looks like developers think I am just another of their stupid customers and they are having a good laugh about this now. Looking through the forum I can see I am not the only person who had asked about this feature, but sure why would you add something meaningful and useful for customers while you can add colorful buttons to the program after almost a year since the last update. 

I have been patient with every single thing I asked about over the last years, waiting for months if not years to get a reply I never received. I trusted you on this feature and purchased a subscription at the end of the last year, hoping that the update is just around the corner. This is just straight disrespectful. 

I would like to ask to suspend my subscription and allowing me to reactivate it when the feature is ready. I bought a program I am not using because I believed in this community and their promises. 

  • All members
  • Posts: 154
  • Gender: Male
Re: Formula for delay in-play
« Reply #8 on: 14 Feb 2022, 17:08 »
If I've understood the requirement correctly, you want to be able to tell when the start of an event has been delayed by 5 or so seconds.

There are several time related variables that should help achieve this.

A trigger expression of (now_time - event_start)/0.00001157 gives the difference between the event start time and what the current time is in seconds.  Before the event the result will be negative, after the event start time it will be positive.

So, testing this trigger expression to be between 5 and 7 (or whatever the requirement was) will give you what you want.
If the delay you wanted to measure was actually in play, then event_off could be used in a similar fashion.

Does that help?

regards

Wez

  • Moderator
  • Posts: 3597
*
Re: Formula for delay in-play
« Reply #9 on: 14 Feb 2022, 18:13 »
Hi
Wez's post above got me thinking. If your requirement is to measure the in-play delay for bets, this could be done firing in a live bet and measuring how long it takes to register in MFP. I think this could be a better method than a variable for in-play delay because it measures the full latency for the bet's "round trip" MFP > Betfair+inplay delay > MFP.

If you put the trigger block in the attached trigger at the start of your trigger file, it will:
  • as soon as market is in-play fire in a real back bet for £1 at odds of 1000 on the fav and make a note of the time
  • it will record the time as soon as the bet is registered as an unmatched back bet in MFP
  • measure the time difference between firing and being registered in MFP and put this value in a user variable called ipd
  • cancel the £1 bet at 1000 according to Bet Lifetime in the backing trigger

then in your betting trigger:
and selections trigger expression ipd is between x and y

You can see in the attached screenshot I get 11.5 secs. As mentioned earlier this will take into account internet latency and Betfair in-play betting delay, so you can experiment with what is best for you.
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.

  • All members
  • Posts: 53
Re: Formula for delay in-play
« Reply #10 on: 15 Feb 2022, 13:25 »
Thanks Mark and Wez.

I will test it. Thank you for your help.

Although I still believe this is an overkill, because the only thing that needs to be done is extracting a constant for each market. Just like you import eventName and date, the moment market goes in play you extract betDelay 

I looked at API and historic data format and this is where it is

"marketDefinition: .... "bspReconciled":false,"complete":true,"inPlay":true,"crossMatching":true,"runnersVoidable":false,"numberOfActiveRunners":6,"betDelay":5

This is what the majority of programs do - they display this value the moment market goes in-play. I thought everyone was aware of how simple it is to find and that is why it was promised to be added soon. I believe MFPro extracts much more complicated data on each refresh.

I will run tests on your function and if I get good results then I will post an update and then you can close this thread. Thanks once again

  • All members
  • Posts: 154
  • Gender: Male
Re: Formula for delay in-play
« Reply #11 on: 15 Feb 2022, 16:54 »
Hi LiAIH4

thanks for updating us on what it was exactly you were after.  I clearly got the wrong end of the stick!

I'm not a programmer but what you are asking for looks like it has to be something the MFP code extracts and displays on the loaded market page, say alongside the Timestamp.

Hopefully it gets added in the next update for you,

regards

Wez  

  • All members
  • Posts: 53
Re: Formula for delay in-play
« Reply #12 on: 21 Feb 2022, 10:12 »
Hey again,

I tried to run some tests and make a trigger that would save the data into excel so that I can create an empirical correction to the real delay from the measured one. It was a complete mess and it would place so many small bets at odds 1000 but not write the data properly to excel. 

To make it easier, I limited simultaneous refreshing to 1 market only. After the bet was placed and data written to excel, I attempted to cancel all unmatched bets and delete the market to proceed to another one. Unfortunately, it often fails to cancel the unmatched bets and once the market is deleted the trigger is not able to cancel any bets and they remain there until the market is manually reopened.

Is there any workaround to this? I have attached the trigger. You can see in the current version I tried to stop refreshing and then delete after that. I also included cancel all in all those triggers but still not working well, many bets remain uncancelled. 

  • Moderator
  • Posts: 3597
*
Re: Formula for delay in-play
« Reply #13 on: 21 Feb 2022, 20:37 »
Hi
My thought was until the betDelay variable is added, in the interim to try a workaround trigger to measure how long it takes for a bet to register in your MFP. Your original spec was 5-7 secs delay = bet, 9-12 secs delay = no bet. Obviously with the trigger sending a test bet the measured time would be longer and you could experiment with what time range is reported back from the trigger to what suits you best.

Some thoughts on the Excel:

Ideally it would be best to avoid using the Excel link. It is old DDE technology and it's non-reliability is well documented on the forum. And it uses lots of resource.

The trigger cancels the bets and stops refreshing the market on the same single refresh. Once a market has stopped being refreshed no further triggers can be executed in that market. Even delete market has to have it being refreshed.

I would suggest:
(if writing to Excel) separate trigger to write to Excel
trigger to cancel bets once per market, when you have the "ipd" figure (and Excel)
trigger to delete market with conditions to check: cancel bets number of runs is greater than 0, and no matched or unmatched bets left remaining  

Incidentally, if it helps, the information for in-play bet delays by sport, and a further breakdown by football leagues, is researchable on the internet. If you have not come across it and is of interest to you please send me a PM  


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.

  • All members
  • Posts: 53
Re: Formula for delay in-play
« Reply #14 on: 22 Feb 2022, 10:30 »
Thank you, Mark! Unfortunately, delay tends to vary from match to match in certain leagues so there is no universal solution to that. 

 

Please note, BetFair is seems to be currently OFFLINE