Author Topic: Possible issue with using variables to populate a list?  (Read 2771 times)

Tags:
  • All members
  • Posts: 22
  • Gender: Male
Hi,
I'm attempting to do the following ( pseudo code )

set user variable list_one = 1,2,3

seletion's index is in list list_one

and it doesn't seem to like it. Any ideas of an easy way to pass variable list names to a condition? Ideally I'd like to avoid specifying each selection as it's own variable.

Thanks!

  • Moderator
  • Posts: 3654
*
Re: Possible issue with using variables to populate a list?
« Reply #1 on: 10 Jul 2020, 16:11 »
Hi
variables cannot be used in "is in list"
from the manual:
ยทis in list
Returns TRUE if the left operand is equal to one or more strings separated by commas and listed in the right operand.
Selection's Name is in list "The Draw", "0 - 0", "1 - 1"
Please note that the right operand must not be a trigger expression, i.e. it shouldn't include variables.

not quite sure what you are wanting to do but:  
you could write to a file and use selections index is in file

or

use condition blocks:

OR
selections index is in list 1, 2, 3
and appropriate conditions for list_one
OR
selections index is in list 4, 5, 6
and appropriate conditions for list_two
OR
etc...
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: 22
  • Gender: Male
Re: Possible issue with using variables to populate a list?
« Reply #2 on: 10 Jul 2020, 16:23 »
Thanks for the reply Mark. Variables can be used with is in list. You can see an example of it in the Two Stage Dutching trigger.

https://marketfeeder.co.uk/learn/triggers/two-stage-dutching-(back)/

However, in this a sequence of variables is used, but still the program knows to expand them and they treats them individually.

I am attempting to set one string rather than setting multiple strings as in the two stage dutching trigger, that way I can alter the indexes I want to dutch on the fly by changing the string I submit to the dutching triggers.


  • Moderator
  • Posts: 3654
*
Re: Possible issue with using variables to populate a list?
« Reply #3 on: 10 Jul 2020, 17:27 »
I don't think is in list will work. Please see attached screenshot example of is in file. Rather than setting a user variable with the indexes, it writes the indexes to a file on the fly, which can then be referenced by the betting trigger. I used volume % just to test.
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