Author Topic: check for market name in file  (Read 3286 times)

Tags:
  • All members
  • Posts: 314
check for market name in file
« on: 14 May 2016, 07:52 »
Hi,

I have a strategy that will bet at certain markets. I have tried adding the markets I am using into a text file, and have created the file as below:


"Horse Racing / GB / Bang 14th May / 13:55 Bang 14th May 2m3f Nov Hcap Hrd"
"Horse Racing / GB / Thirsk 14th May / 14:15 Thirsk 14th May 6f Hcap"
"Horse Racing / GB / Newb 14th May / 14:45 Newb 14th May 1m4f Grp3"

I then want to setup my trigger to check using a condition as

Market's name is in file C:\selections\markets.txt
and Selection's Rank is equal to 1



This doesn't seem to work...

Is there something wrong with the Market name I am using? - this is what MFP produces in a spreadsheet I create daily for the next days races, so I just assumed I could use that value?

Thanks

Mark.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: check for market name in file
« Reply #1 on: 14 May 2016, 09:18 »
hi
not sure that the is in file is for the market name as the market_name is a compressed name of what we can read.
it is better to add a new condition block with or conditions
markets name contains Bang
OR markets name contains Thirsk
OR markets name contains Newb

then your file for the selections in another block
and selections trigger expression sel_name is in file (your location file)

mcbee
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: 314
Re: check for market name in file
« Reply #2 on: 14 May 2016, 10:42 »
Hi mcbee,

Thanks, but that won't help, because I want to automate this to be able to simply create a file with the markets in and let the bot pick that up. If I have to use as suggested, it means I have to then insert that into the conditions every day, which will get painful. I use a system where I just pick the 3 markets I am interested in, but even that's a little tiresome.

If I can perhaps use the shortened name in the file?

so

Bang
Thirsk
Newb

?

Mark.

  • All members
  • Posts: 314
Re: check for market name in file
« Reply #3 on: 14 May 2016, 10:56 »
Hi mcbee,

Thanks, but that won't help, because I want to automate this to be able to simply create a file with the markets in and let the bot pick that up. If I have to use as suggested, it means I have to then insert that into the conditions every day, which will get painful. I use a system where I just pick the 3 markets I am interested in, but even that's a little tiresome.

If I can perhaps use the shortened name in the file?

so

Bang
Thirsk
Newb

?

Mark.


Actually, NO, I can't do that, because it will then see any race at any time. I don't have the selections in a file, because they are only relevant based on Rank = 1.

I need to figure out what MFP will accept for the market, and it MUST have a time value in there. Testing on Dogs now to see if it works

Mark.

  • All members
  • Posts: 314
Re: check for market name in file
« Reply #4 on: 14 May 2016, 11:29 »
This is very strange.

Why would MFP give us the option to say "Markets name is in file c:\blah\mkt.txt"

and using the market name given by MFP,

and yet, it doesn't recognise it?

Just tried it on Dogs, using the following to cater for ALL

12:24 Crayfd
Greyhound Racing / BAGS Cards / Crayfd 14th May / 12:24 Crayfd 14th May A8 380m
"Greyhound Racing / BAGS Cards / Crayfd 14th May / 12:24 Crayfd 14th May A8 380m"
"12:24 Crayfd 14th May A8 380m"
12:24 Crayfd 14th May A8 380m

None worked..

Its a simple trigger to place a lay bet on Rank = 1

any ideas?


  • Moderator
  • Posts: 3597
*
Re: check for market name in file
« Reply #5 on: 14 May 2016, 17:31 »
Hi
The trigger condition is very specific and the market name in the text file must be spot-on. Just wondering if this is better done in the Locator, where the condition is "contains values in file". Please see the attached screenshot, I have a very simple text file and it works perfectly. You could run the Locator Template automatically using Scheduler at regular intervals. Then all your trigger needs to do is check the fav.
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: 314
Re: check for market name in file
« Reply #6 on: 14 May 2016, 17:57 »
Hi MarkV,

Thanks for the response.

I will look to do it that way. Problem is, I wont be able to use multiple triggers, that require multiple races, in the same profile.

It is frustrating that MFP offers the ability to input a condition where Market name is in file...., but somehow, can't do it? You say the market name needs to be spot on, well its MFP that is declaring the market, in cell B1 of each sheet. I create a sheet every day in the evening to give me tomorrows races, and then I query this for my use, and I extract cell B1 for each Market Name, and then use only the Market names I need. I was hoping that this should be spot on?

Is it a bug that needs fixing?

Mark.

  • Moderator
  • Posts: 3597
*
Re: check for market name in file
« Reply #7 on: 14 May 2016, 18:46 »
Hi
The following condition will work:
selections trigger expression "market_name" is in file ...path reread
text file in the following format:
"Greyhound - Todays Card / 19:53 Monmore (GB) A4 480m - A4 480m"

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.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: check for market name in file
« Reply #8 on: 14 May 2016, 23:31 »
hi
i have found a work around that will suit your system.
in the excel settings, custom cells & formula
cell address     K1 (or wherever you want to put it)
cell value/formula      market_id
(you will have to reload the markets for the id to be put in K1

then in your trigger replace the markets name condition with
and selections trigger expression market_id is in file (location of file)

then instead of copying cell b1 for the name copy cell K1 (or wherever you put it) and make your list of id numbers.

mcbee
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: 314
Re: check for market name in file
« Reply #9 on: 15 May 2016, 08:43 »
hi MarkV and mcbee,

I am going to attempt MarkV's first, and then I want to try mcbee's next, purely because I have no idea how to do it, and I think if I can get some help, it will enable me to discover much more..

OK, first you say trigger expression "market_name" - I assume that this is enclosed in speech marks?

Next, you say the market has to be in the following format "Greyhound - Todays Card / 19:53 Monmore (GB) A4 480m - A4 480m"

Today's first race has the following format...

"Greyhound Racing / BAGS Cards / BVue 15th May / 11:03 BVue 15th May A9 470m"

So, do I change this to

"Greyhound - Todays Card / 11:03 Belle Vue (GB) A9 470m - A9 470m"

BUT, I was never interested in doing this for dogs, it was for the horses, and I decided to use the greyhounds because there are so many more races I can use in order to test this out.

So, for today's horses, once race is

"Horse Racing / GB / Strat 15th May / 13:50 Strat 15th May 2m Nov Sell Hrd"

so would I set this up as


"Horse Racing - Todays Card / 13:50 Stratford (GB) Nov Sell Hrd 2m - Nov Sell Hrd 2m"

OR, is there a specification for the market format?

Thanks

Mark



  • All members
  • Posts: 314
Re: check for market name in file
« Reply #10 on: 15 May 2016, 08:44 »
oops, sorry, lost my manners

I should also have said thanks for your help!

Mark.

  • Moderator
  • Posts: 3597
*
Re: check for market name in file
« Reply #11 on: 15 May 2016, 09:47 »
Hi
Just tested with horse markets and it fails, sorry.
The condition I mentioned earlier works fine in soccer and I tested ok in greyhound markets. I think as mcbee mentions, the market name is compressed and something is unreadable.

I'll try and do some more testing this evening, but perhaps try mcbee's work around with the market_id?
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: 314
Re: check for market name in file
« Reply #12 on: 15 May 2016, 10:34 »
Hi mcbee,

I have a workaround, for your workaround...

Just so you know, I really need to set this up before I go to work, and as such, I need to get the market_id's of all the markets, and then produce a text file for which market_id's I need. reloading the market_id's wont be an option for me...

I have decided that if I need to be at work by 8am, then I need to get everything sorted by 7:30am, and in general, the races I am interested are within the first 10 races of the day, and for England only, so to be safe, I will have a temp profile, set monitoring options for 9 hours (540 minutes), which takes the last monitored race at that time, to 4:30, and that should easily contain at least the first 10 races. I just tested this out and I can see that it uses a lot of resources by waht looks like the excel process. Once I have set excel to run by MFP, I then close the MFP profile, and then I can extract the market_id's and add the ones I want to a text file.

Fingers crossed, this will work - I can say that I tried it with the approach above, and it has got all the market_id's. I now need to see if this will work using the "selections trigger expression market_id is in file (location of file)"

I will update on today's races, and let you know if it worked.

Thanks for this

Mark.


  • All members
  • Posts: 314
Re: check for market name in file
« Reply #13 on: 15 May 2016, 11:02 »
yeeeeeeeesssss!!!!!!!!!!!!!

It worked. Brilliant!

Thank you.

Tested it on the dogs because I was too impatient to wait for the horses, used 3 market_id's same conditions, rank 1, lay, market_id, and it did as expected, and didn't bet on the 4th race because of no market_id..

I can now get this as automated as possible

Thanks

ahhhhh, I have just realised. The tab names that MFP produces are named as query<market_id> - another stupid moment in my lack of observation!

So I can just do as before without the need to use the extended monitoring times,and grab the market_id's from the tabnames.

Mark.

 

Please note, BetFair is seems to be currently OFFLINE