Author Topic: Advice on odds lookup  (Read 1224 times)

Tags:
  • All members
  • Posts: 141
Advice on odds lookup
« on: 29 Jan 2020, 23:13 »
Hi everyone,

I'm looking to take value if there is any on the overs market during in-play. But every league has different value odds at different times. So for example the Premier League, 1-0 at 20 minutes I might want to look for odds of 1.4 but in a different low scoring league I might want to get odds of 1.25.

My question is what's the best way to look up what odds I want depending on the time of match, the score and league? Is it a load of conditions in the trigger? A massive IF statement? Some kind of file with the data in it?

I tried something similar a few years ago but it was far too resource hungry and kept crashing.

Thanks for any advice!

Whitey :)
Yeah! :p

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Advice on odds lookup
« Reply #1 on: 30 Jan 2020, 09:02 »
Hi!

This sounds like a lot of criteria which will naturally translate to either lengthy IF statements (you've been there already) or multiple blocks of conditions such as these:

Market's Betting Code is Correct Score
and Selection's Name is equal to "1 - 0"
AND
  OR
    Market's Name contains "La Liga"
    and Selection's Trigger Expression match_minute is between X and Y
    and Selection's Back Price is between minX and maxY
  OR
    Market's Name contains "Premier League"
    and Selection's Trigger Expression match_minute is between X and Y
    and Selection's Back Price is between minX and maxY
 ...
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 141
Re: Advice on odds lookup
« Reply #2 on: 30 Jan 2020, 11:40 »
Hi Oxa,

Thanks for your reply. In your experience does MFP work better with one or many different IF statements or lots of different conditions?

Thanks,

Whitey
Yeah! :p

  • Moderator
  • Posts: 3597
*
Re: Advice on odds lookup
« Reply #3 on: 30 Jan 2020, 13:20 »
Hi
Can I give you my thoughts on this:

An IF statement has to be perfect. If one variable for some reason has no value it will fail, so you would need conditions to check the variables in the IF statement are set. Also if you need to edit the values or the whole IF statement, it will be a difficult job.

Overall performance using an IF statement or conditions will be completely dependent on the number of concurrently refreshing markets. I see you will be operating in OU markets, I think you will certainly need to consider a limit on how many markets will be refreshing at any one time.

Your application is spot-on for maintaining all your values in Excel and using conditions like Oxa has shown to read cell values, but if you don't want to go that route I would suggest the same conditions but using an automatically imported text file with the values next to selection names. you would then use imported_1 imported_2 etc. in the conditions. Easy to maintain and update the file.

And the last suggestion, if you just use conditions, to use constants for ease of editing your values.

But as I say I think the key to this working efficiently will be a limit on number of refreshing markets.

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.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Advice on odds lookup
« Reply #4 on: 03 Feb 2020, 11:34 »
Quote
In your experience does MFP work better with one or many different IF statements or lots of different conditions?

I would stay away from more than 4-5 nested IFs -- that's usually a sign of some bad programming, i.e. there might be other ways to do it through variables, conditions etc. Not in your case though.

The parsing of trigger expressions is a resource-demanding job, so I'd go with conditions instead. Also lots of wisdom from MarkV in the previous message.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 405
Re: Advice on odds lookup
« Reply #5 on: 04 Feb 2020, 14:09 »
Hi Oxa

As I understand from what you just said, it's far better to use trigger conditions rather than trigger expressions if it's possible.  So as an example, is using the trigger condition 
'probable losers rank is less that 8' 
more efficient (ie quicker) for the programme to process than the trigger condition 
'selections trigger expression runner_number is less than 8'
Both produce the same answer, but is the 1st method the best to use?


  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Advice on odds lookup
« Reply #6 on: 06 Feb 2020, 17:13 »
Quote
Both produce the same answer, but is the 1st method the best to use?

That is correct, although the expression runner_number is a very short one, so the overhead won't be too noticeable.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 141
Re: Advice on odds lookup
« Reply #7 on: 06 Feb 2020, 17:15 »
Thanks for the replies and great discussion, I have it up and running and working OK at the minute. 
Yeah! :p

 

Please note, BetFair is seems to be currently OFFLINE