Author Topic: Keeping list of bets  (Read 1848 times)

Tags:
  • All members
  • Posts: 110
Keeping list of bets
« on: 21 Jun 2017, 16:23 »
I need to keep a variable with the names of horses that I bet on. I was using 'set variable' set to storednames+sel_name every time a new horse is added. I am then using FIND("sel_name", "storednames") to see if a bet has been made, (if result is >0). However I am encountering a problem with spaces being removed from the horses name when adding it to the variable but not when using sel_name in the FIND expression and thus the name is not found. Can you offer any suggestions? Thanks

  • Moderator
  • Posts: 3597
*
Re: Keeping list of bets
« Reply #1 on: 21 Jun 2017, 20:27 »
Hi
string variables should be in quotation marks, use "sel_name" when adding to your user variable. 
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: 110
Re: Keeping list of bets
« Reply #2 on: 22 Jun 2017, 05:24 »
Sadly that doesn't solve the problem. I have set up a test as follows:

Trigger A
- set user variable  myvar  myvar+"sel_name"
- set user variable myvarset  1

Trigger B
Conditions myvarset is equal to 1
- set user variable  myvarposition  FIND("sel_name", "myvar")

Both selections set to Favourite

Results using View User Variables
myvar=myvar+"Simpson"+"Simpson"  (Not sure why the name is added twice)
myvarset=1
myvarposition=FIND("Simpson","myvar+"Simpson"+"Simpson"")  (i.e. doesn't compute)

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Keeping list of bets
« Reply #3 on: 22 Jun 2017, 07:44 »
Hello!

The program is not made to allow the concatenation of strings in that way. Are you tring to add another string to the selection's name?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 110
Re: Keeping list of bets
« Reply #4 on: 22 Jun 2017, 07:55 »
I'm trying to keep a list of horses that a particular trigger has placed a bet on. Other triggers can also place bets on the same horse. I am doing this by adding the horses name to a string when a bet is placed on it. It was working but only if there were no spaces in the horses name. Maybe you can suggest a better way of achieving this.

Thanks

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Keeping list of bets
« Reply #5 on: 22 Jun 2017, 09:03 »
There is a much simple way of doing this. Check this condition where you need to find out whether a particular trigger has been executed on the selection:

Trigger [trigger name] Number of executions per selection is greater than 0
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 110
Re: Keeping list of bets
« Reply #6 on: 22 Jun 2017, 09:31 »
Thanks Oxa - I'll give it a go

 

Please note, BetFair is seems to be currently OFFLINE