Author Topic: Pick from text file  (Read 8327 times)

Tags:
  • All members
  • Posts: 72
Pick from text file
« on: 30 Sep 2014, 12:38 »
Is this possible? - I have a list of runners in a text file that are ranked. Is there a way to step through the list to pick the first 2 qualifiers (to account for non runners). I am having to manually amend the text file I use at the moment to account for any non runners. If I could just step through the list and back the available qualifiers per race would make things easier.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Pick from text file
« Reply #1 on: 30 Sep 2014, 15:46 »
You just import the selections from the file, don't delete anything manually, then in your trigger you ask the trigger to apply its action to the first two ranked selections. This is done in this way:

.. your other conditions, if any, go here..
and Selection's Sorting order is defined by sel_order
and Selection's Trigger Expression match_index is between 1 and 2


Non-runners will be ignored if they are not in the market by the time you're doing the import.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 72
Re: Pick from text file
« Reply #2 on: 30 Sep 2014, 17:22 »
excellent - many thanks.
BTW - malwarebytes anti malware on my PC has just recently blocked all your websites for some reason.

  • All members
  • Posts: 72
Re: Pick from text file
« Reply #3 on: 30 Sep 2014, 17:59 »
Tried this in test mode it just picked the first two in the market and not the first two in the list imported for that particular race.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Pick from text file
« Reply #4 on: 30 Sep 2014, 20:19 »
Just tried it myself and it worked correctly, so I must be misunderstanding.

So you have a text file with a number of selections, more than 2 obviously. You import those selections by pressing "Import selections for auto-trading", and immediately the horses that are not on the list are greyed out. You then run the trigger with the conditions I gave you, and it still bets on the first and second favourite in the race, and not on the two lowest-priced horses from your list that belong to this race?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 72
Re: Pick from text file
« Reply #5 on: 30 Sep 2014, 21:44 »
I think this didn't work because i had the all selections active for auto trading - however I don't want it to back the two lowest priced in the list just the first two - every horse will be ranked from top to bottom in the text file. Do I need to add another field - i'm trying to eliminate non runner issue

eg 6 runners
a
b
c
d
e
f

I import text file as above (normally I would just have a and b in list) but if a is a non runner I want it to back b,c , if b is a non runner a and c, if abc Non runners d,e etc.

I hope this makes sense

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Pick from text file
« Reply #6 on: 01 Oct 2014, 12:59 »
OK, then put numbers from 1 to N, where N is the index of the last selection in your list, next to each selection's name separated by a Tab character. So in your example it would be:

a   1
b   2
c   3
d   4
e   5
f   6

There is a [tab] between a and 1 and all other pairs in the list. You can learn more details on this in the manual, chapter "Auto-Trading -> Import selections for auto-trading", under "Importing numeric and text values".

So then import this file as usual, and then use the reference to those numbers in your trigger:

Selection's Sorting order is defined by imported_1
and Selection's Trigger Expression match_index is between 1 and 2


Even if a is a non-runner, the next selection that will be picked is b, as it has the next lowest value of imported_1, which is the value that stands next to the name in the list.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 72
Re: Pick from text file
« Reply #7 on: 01 Oct 2014, 19:17 »
Perfect - works exactly as I want now.

Many thanks.


  • Élite
  • Posts: 431
*
Re: Pick from text file
« Reply #8 on: 03 Oct 2014, 05:53 »
Hi Oxa,

How would I do something similar, but with lists.  So I have the names in a text file and just want to pick the selection if it is in that list (stored as a text file). That bit is easy.

However, if there is not a selection in that list, (in the case of a non runner) then to check a second list.  I am not sure how to check a match has been found and to apply the second condition only if there is no match.

I would perfer not to use the import route described above as I need to refer to the lists from more than one computer and importing to both would create more work and opportunities for me to forget etc.  Also I may wish to remotely update the list files (from my phone for example) and cannot get to my computed to re-import the list.


Thanks
Alfaman

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Pick from text file
« Reply #9 on: 03 Oct 2014, 15:27 »
alfaman,

Well, there is the "not in list" condition to check that the selection is not in that list. Or am I missing something?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • Élite
  • Posts: 431
*
Re: Pick from text file
« Reply #10 on: 03 Oct 2014, 16:46 »
No sorry I was obviously not explaining properly.

I want to take a selection from the first file, and if there is a selection, then stop, but if there is no selection in the first file (due to a non runner) then take a slection from the second file.


  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Pick from text file
« Reply #11 on: 03 Oct 2014, 17:23 »
How about:

  Selection's [whatever] is in list List 1
OR
  Selection's [whatever] is in list List 2


If the first condition is true, the other one will be dismissed, so it'll only get to the second one if the selection is not in the first list.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • Élite
  • Posts: 431
*
Re: Pick from text file
« Reply #12 on: 03 Oct 2014, 21:45 »
thanks - I ll try that

  • Élite
  • Posts: 431
*
Re: Pick from text file
« Reply #13 on: 04 Oct 2014, 13:09 »
No - that did not work see below, I only Osaila to be backed,  any further ideas?

13:49:53   Checking market "Horse Racing / GB / 13:50 Newm 4th Oct".
13:49:53       Checking condition and Selection's Back Price is between 1 and 100.
13:49:53       Condition is: TRUE. valid for 7 selections: Osaila, Very Special, Lacing, Light Fantastic, Yorkidding, Thunder In Myheart, Melodious.
13:49:53       Checking condition and Market's Minutes Before the Off is equal or less than 0.2.
13:49:53       Condition is: TRUE. valid for 7 selections: Osaila, Very Special, Lacing, Light Fantastic, Yorkidding, Thunder In Myheart, Melodious.
13:49:53       Checking condition or Selection's Name is in file ....[path]\HFirst.txt.
13:49:53       Condition is: TRUE. valid for 1 selections: Osaila.
13:49:53       Checking condition or Selection's Name is in file ....[path]\Second.txt.
13:49:53       Condition is: TRUE. valid for 1 selections: Very Special.
13:49:53   Going to Back at SP on 2 selections:
Liability £ 5.00 on "Osaila".
Liability £ 5.00 on "Very Special".

  • Moderator
  • Posts: 3597
*
Re: Pick from text file
« Reply #14 on: 04 Oct 2014, 16:41 »
Hi
Just popping in on your last post alfaman, I wonder if this would work (and I think what Oxa means):

selections: first matching selection

conditions:
your conditions here....
AND         <------condition block
    selections name is in file first.txt
    or selections name is file second.txt  
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