Author Topic: Setting variables - string formatting, rounding digits  (Read 734 times)

Tags:
  • All members
  • Posts: 53
Hi,

I encountered the following problem. I want my trigger to set up a variable that will decide on which market to bet based on numbers of goals scored. 

Trigger number 1 does - set variable vargoal1 as "market_score1+market_score2+0.5"

Trigger number 2 does - If market's name contains vargoal1, place a back bet

The problem is my vargoal1 becomes this    Setting variable vargoal1 to 0.50000000.

Any work around?

Thanks in advance

  • Moderator
  • Posts: 3597
*
Re: Setting variables - string formatting, rounding digits
« Reply #1 on: 21 Jul 2021, 09:17 »
Hi
The easy way to do this is to use this condition:
Markets Betting Code is Over/Under (Soccer) market_score1+market_score2+0.5

This will bet in current score OU market. If you wanted to bet say 2 goals ahead of current score OU change the 0.5 to 2.5

You could probably do it with a user variable, but it's mixing string variables with numeric values and more could go wrong. 
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: 53
Re: Setting variables - string formatting, rounding digits
« Reply #2 on: 21 Jul 2021, 12:47 »
Fantastic! Thank you

 

Please note, BetFair is seems to be currently OFFLINE