Author Topic: No function concerning the management of strings ?  (Read 6961 times)

Tags:
  • All members
  • Posts: 13
Hi everybody,

I am surprised that there is no function (except 'FIND') concerning the management of strings.
Indeed it would be very useful to be able to extract a substring (essential in order to extract the name of a meeting for example), all the basic functions left, right, middle ...

Regards,

Fred.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: No function concerning the management of strings ?
« Reply #1 on: 01 Aug 2012, 11:10 »
hi
if you want to find anything in the market name, you just use the condition.
AND markets name contains "6f"
etc, what ever you are looking for.


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: 13
Re: No function concerning the management of strings ?
« Reply #2 on: 01 Aug 2012, 11:50 »
hi
if you want to find anything in the market name, you just use the condition.
AND markets name contains "6f"
etc, what ever you are looking for.


mcbee


Hi mcbee,

I don't want to find something in particular, I want to know the name of the meeting.
Because when you want the trigger bets with a staking plan for each meeting, it is not possible, especially if there are five meetings at the same time.
I don't think so that it is very difficult for the MFP team to add these functions.

Regards,

Fred.

  • All members
  • Posts: 3605
Re: No function concerning the management of strings ?
« Reply #3 on: 01 Aug 2012, 19:49 »
Hi
I agree with you, some string functions would be useful.

For the example you give above, a workaround might be a block of triggers per meeting?
all blocks deactivated by default
activate Trigger Block “Staking plan A” Condition: Market’s Name contains “Meeting A”
…deactivate as soon as your trigger block has finished in this market
activate Trigger Block “Staking plan B” Condition: Market’s Name contains “Meeting B”
…deactivate as soon as your trigger block has finished in this market
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.

  • Tim Vetrov
  • Administrator
  • Posts: 4873
  • Gender: Male
*
Re: No function concerning the management of strings ?
« Reply #4 on: 01 Aug 2012, 20:12 »
Fred, could you please give me an example of using such functions?
Thank you.
Proud to be 🇺🇦
I'm happy to help Monday - Friday, 08:00-18:00 GMT
Буду рад помочь с понедельника по пятницу, 08:00-18:00 GMT

  • All members
  • Posts: 13
Re: No function concerning the management of strings ?
« Reply #5 on: 01 Aug 2012, 20:36 »
Fred, could you please give me an example of using such functions?
Thank you.

Hi Tim,

I would like to use it to perform my trigger per meeting (greyhound market and horse racing market too), because I want to use my staking plan for each meeting separately.
Thank you.

Regards,

Fred.

  • All members
  • Posts: 13
Re: No function concerning the management of strings ?
« Reply #6 on: 01 Aug 2012, 20:40 »
Hi
I agree with you, some string functions would be useful.

For the example you give above, a workaround might be a block of triggers per meeting?
all blocks deactivated by default
activate Trigger Block “Staking plan A” Condition: Market’s Name contains “Meeting A”
…deactivate as soon as your trigger block has finished in this market
activate Trigger Block “Staking plan B” Condition: Market’s Name contains “Meeting B”
…deactivate as soon as your trigger block has finished in this market
etc.



Hi Mark and thank you for your help.
Your idea is interesting but I don't know in advance the name of the meetings, and they are different day by day...

Regards,

Fred.

  • All members
  • Posts: 3605
Re: No function concerning the management of strings ?
« Reply #7 on: 01 Aug 2012, 21:45 »
Hi
OK, I was thinking of pre-preparing your blocks of triggers using the names of the courses (meetings) and having the initial trigger open the relevant block. But I can see your problem.

I think what Tim is after is if you would mind giving a quick example:

Assuming basic Excel string functions were available (LEFT, MID, RIGHT)
what would be your trigger condition to apply “Staking plan A” to this market_name, and subsequent markets at this meeting?
"Horse Racing - Todays Card / 15:00 Gal - 1m Hcap"

I think it will be something like
set user variable “meeting”
MID(market_name, FIND(“ / ”,market_name)+6, 3)
not sure my syntax is correct!
which will return “Gal“ (i.e the first three characters of the meeting name) – which is what you don’t know in advance, and now you can set a condition for staking plan A using this value.

am I going in the right direction?

Basically it allows extraction of substring, which is not currently available in MF Pro.
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: 13
Re: No function concerning the management of strings ?
« Reply #8 on: 02 Aug 2012, 07:56 »
Hi
OK, I was thinking of pre-preparing your blocks of triggers using the names of the courses (meetings) and having the initial trigger open the relevant block. But I can see your problem.

I think what Tim is after is if you would mind giving a quick example:

Assuming basic Excel string functions were available (LEFT, MID, RIGHT)
what would be your trigger condition to apply “Staking plan A” to this market_name, and subsequent markets at this meeting?
"Horse Racing - Todays Card / 15:00 Gal - 1m Hcap"

I think it will be something like
set user variable “meeting”
MID(market_name, FIND(“ / ”,market_name)+6, 3)
not sure my syntax is correct!
which will return “Gal“ (i.e the first three characters of the meeting name) – which is what you don’t know in advance, and now you can set a condition for staking plan A using this value.

am I going in the right direction?

Basically it allows extraction of substring, which is not currently available in MF Pro.


Hi Mark,

This is exactly what I want to do !

Regards,

Fred.

  • Tim Vetrov
  • Administrator
  • Posts: 4873
  • Gender: Male
*
Re: No function concerning the management of strings ?
« Reply #9 on: 02 Aug 2012, 16:21 »
OK, so what the condition to use the "meeting" variable?
Proud to be 🇺🇦
I'm happy to help Monday - Friday, 08:00-18:00 GMT
Буду рад помочь с понедельника по пятницу, 08:00-18:00 GMT

  • All members
  • Posts: 13
Re: No function concerning the management of strings ?
« Reply #10 on: 02 Aug 2012, 19:21 »
OK, so what the condition to use the "meeting" variable?

In fact it would be great to be able to use these functions (left, right and mid) not only with the meeting variable but with every string variable like the FIND function in MFP.

Regards,

Fred.

  • All members
  • Posts: 3605
Re: No function concerning the management of strings ?
« Reply #11 on: 02 Aug 2012, 20:50 »
Hi
I think this is Fred’s point. There are limited string functions in MFPro. The only one I can think of is what Fred mentioned: FIND(pattern, string) and I cannot see how you can extract a substring such as the meeting name using this.

In the above example, user variable ‘meeting’ holds the first three characters of the meeting name
The condition I was hoping to use: market’s name contains ‘meeting’
alternatively market’s name contains MID(market_name, FIND(“ / ”,market_name)+6, 3)

On a wider outlook, the ability to extract and use substrings in triggers from the market name, and other API string data as well, will surely add further functionality to MFPro. Working with strings has come up several times on here. Would anyone else find this useful?
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: 13
Re: No function concerning the management of strings ?
« Reply #12 on: 05 Aug 2012, 15:44 »
Hi there,

It would be great to add too a "length" as string function.
For example I would like to count the number of letters of the horse name, for the moment it is not possible...

Regards,

Fred.

  • All members
  • Posts: 3605
Re: No function concerning the management of strings ?
« Reply #13 on: 05 Aug 2012, 19:19 »
Hi
silk_form_ does allow a more comprehensive range of string expressions, including length, but this functionality does not extend to other string data in MFPro. I guess it’s understandable given that most variable data is numeric.
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