Author Topic: Win bet placement from Excel file  (Read 4154 times)

Tags:
  • All members
  • Posts: 829
Win bet placement from Excel file
« on: 29 May 2020, 09:21 »
Hi,
I am a little ring rusty as been concentrating on building models and data management for the past couple or so years.
Now with the restart of racing looming I would like to place win bets from an Excel file.
Bets to be placed 2 minutes before official off time and BSP odds >2.4
Can someone please assist
Many thanks
Ian
My grandma taught me not to run downstairs and never back odds on.

  • All members
  • Posts: 1
Re: Win bet placement from Excel file
« Reply #1 on: 29 May 2020, 10:29 »
The content in this post is good content that is suitable for those who are looking for various content.

  • Moderator
  • Posts: 3605
*
Re: Win bet placement from Excel file
« Reply #2 on: 29 May 2020, 13:33 »
Hi
A couple of things to check first:
It is possible to import selection names from Excel but it would be much easier to have your selection names in a text file. The following two videos give an idea of how this would be done.
https://www.youtube.com/watch?v=JxBkUawZb2U
https://www.youtube.com/watch?v=-zNhSl5ypn0

Betfair Starting Price (BSP) is available at the off as soon as the market turns in-play. If you wanted to back at best back price 2mins before the off your trigger would be something like below:

this trigger does not need the import process, it uses a condition to check if the selection's name is in the text file

back
price: back_price
amount: xx
all matching selections
once per market
conditions:
markets minutes before the off is less than 2.00
and selections name is in file ...path to .txt file
and selections back price is greater than 2.40

if you want to go Excel route it can be done, worth looking at the Excel Interface section of the help file
  
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: 829
Re: Win bet placement from Excel file
« Reply #3 on: 30 May 2020, 05:53 »
Mark, Thanks for the link however I would like to go the Excel route
as I potentially will bet 60+ selections on any given day.
I checked out the Excel help section but it was mostly troubleshooting.
Is there a video ?
I simply want to put on a list win bets at >2.40 at around 1 min before OFF 
Thanks
Ian
My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3605
*
Re: Win bet placement from Excel file
« Reply #4 on: 30 May 2020, 15:48 »
Hi
I had a look for a video showing the Excel interface but could not find one. The helpfile section on the Excel Interface explains how it works, please see attached screenshot.
 
Your requirement is not complicated and the standard method for doing this is from a text file. Just save your Excel file as a text file (File > Save As > Type: .txt) and follow the formatting guidelines in the video. You can use the simple trigger above to place the bets. No problem with unlimited number of selections in a text file.

Using the Excel link to MFP to do what you want to do is going to be more complex as you will glean from the helpfile and it will be more cumbersome to operate.

As mentioned it is possible to code a trigger to bet through the link to Excel. Have a look at the helpfile and see what you think. Due to the complexity if you want it coded it would need to be through the trigger writing service.

My suggestion for your requirement is the easy way using .txt file






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: 829
Re: Win bet placement from Excel file
« Reply #5 on: 30 May 2020, 16:06 »
The idea of formatting 60 runners with "" for runners with 2 or more parts to the name sounded a 
bit daunting. Perhaps I am a lazy git. I guess I'll have to do that if as you say the Excel route is more complex.
Cheers
Ian
My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3605
*
Re: Win bet placement from Excel file
« Reply #6 on: 30 May 2020, 16:25 »
highlight the cells to format
right click > Format > Custom
paste this into the Type: box
\"@\"
click ok
 
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: 829
Re: Win bet placement from Excel file
« Reply #7 on: 30 May 2020, 16:30 »
That makes it easier. Just one question though. In the example above the runner Docklands is a single word. Will the "" surrounding it still work
or would I need to remove them ?
My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3605
*
Re: Win bet placement from Excel file
« Reply #8 on: 30 May 2020, 16:36 »
yes it's fine to leave the quotes around single words, have a play in test mode
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.

  • Moderator
  • Posts: 3605
*
Re: Win bet placement from Excel file
« Reply #9 on: 30 May 2020, 17:07 »
hmm just tried that formatting and I got triple quotes in the text file. need to research more on Excel formatting, will post here.   
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: 829
Re: Win bet placement from Excel file
« Reply #10 on: 30 May 2020, 17:33 »
I tried and I get double quotes in Notepad.
My grandma taught me not to run downstairs and never back odds on.

  • All members
  • Posts: 829
Re: Win bet placement from Excel file
« Reply #11 on: 30 May 2020, 17:40 »
Here are my early bets for Monday showing double Quotes
"Al Ozzdi"
"Stone Mason"
"Dancin Boy"
"Bonds Boy"
"Ice Pyramid"
"Alignak"
"Thibaan"
"Hatheem"
My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3605
*
Re: Win bet placement from Excel file
« Reply #12 on: 30 May 2020, 17:54 »
Nice one, I'm still getting """three double quotes""" which I can find and replace
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: 829
Re: Win bet placement from Excel file
« Reply #13 on: 30 May 2020, 17:58 »
Are your source cells in Excel set to General format ?
My grandma taught me not to run downstairs and never back odds on.

  • Moderator
  • Posts: 3605
*
Re: Win bet placement from Excel file
« Reply #14 on: 30 May 2020, 18:27 »
teamwork :)
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