Author Topic: Check for other bets  (Read 1571 times)

Tags:
  • All members
  • Posts: 314
Check for other bets
« on: 08 Sep 2019, 20:24 »
Hi,

I am not sure how to do this, so here goes...

I want to place a back bet on the football match odds draw, based on conditions - fine, no problem with that.

Once I have a bet placed, I do not want to place any more bets in ANY football match odds market, until the existing match finishes, and we have a result. I want to do it this way because I only wish to have 1 bet in place at a time, and once the match has been settled, if it is a loss, I plan to increase the stake, to recoup some of the loss in the next match's bet

I am not sure how to ask for "If I already have a bet matched in the win markets on football, elsewhere aside from this match - no more bets until this bet has settled" - can I do this, or do I have to look at another way to check this.

Any help is appreciated

Thanks

  • Administrator
  • Posts: 8824
  • Gender: Female
*
Re: Check for other bets
« Reply #1 on: 09 Sep 2019, 12:01 »
Hello!

Do this using the standard way:

1. Define a variable which will act as a flag. I call it bet_cntr. Set it to 0 globally at the beginning (one time only).

2. Once you've placed a bet, in that same trigger add another action which sets bet_cntr to 1. In the conditions of that trigger add:

Selection's Trigger Expression bet_cntr is equal to 0

3. Add another trigger, to be executed in Settled markets. It should set bet_cntr to 1. In its conditions add:

Market's Betting Code is Match Odds
and Trigger {name of the betting trigger} Number of runs 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: 314
Re: Check for other bets
« Reply #2 on: 09 Sep 2019, 12:48 »
Hi Oxa,

Thanks for your help...

I do kind of know to do that..

BUT, it doesn't fully solve my need... Here's why...

Let's say I need to make a change to one of the triggers/trigger blocks. By doing that, the only way to allow the added functionality to be used, I must press the Reload button. Once I do that, bet_cntr will be set to 0.

It would be ideal, on MANY facets of the development process, to be able to read a value from a file, for whatever reason, to give the desired conditionals. You provide us with the ability to create selections within a file, so, MFP can read files and respective values

Such as when this bet is placed, rather than set the bet count to 1 in a variable, have it stored in a file, and then by having a condition in the trigger, to say "if value in file is 0 - place a new bet". Adding in this capability would solve so many problems for me, and make my trigger coding so much easier. as a developer, I do this loads of times, if the sql cell has a certain value, do the appropriate action. If this xmlattribute is a certain value, do this action. etc etc. There are so many more things that using this approach can solve in MFP. I wish you would add it in.

Anyway, this isn't a rant, it is just my feedback on a feature that would really be very useful. Imagine how much easier it would be to set the price you want in a dynamically assigned file. So, set the back price required to 3.5. Sure, maybe not everybody thinks this is a great addition, but I know I am always finding myself saying "I wish I had this ability to just look in a  file for a value". From the amazing set of features you offer us in MFP, this one is missing. I know you offer the 'import selections' feature, but I just don't get along with this feature, because it is limiting

Thanks again for your help

  • All members
  • Posts: 314
Re: Check for other bets
« Reply #3 on: 09 Oct 2019, 20:51 »
OK, not sure if anybody will read this, as I asked this question some time ago, ad maybe its gone out of scope. If so I will ask another question an another post.

Given that I want to see if there are any current bets, and the reason I want to do this is because I only want 1 bet to be active at any time, and dependent upon the result of this bet, if its a win, then no action is taken, but if it is a lose, I want to have a fibonacci betting plan, and as such, my betting amount will be using the following setup...

bank * percentageValue * fibonacci(1,fibValue, 0), I will have a constant, named fibValue, with initial value of 2, because fibonacci(1,2,0) equal 1, which is my initial value needed for the first bet. This isn't some attempt to educate anybody on fibonacci, I will get to my point eventually....

IF we have a losing bet, then I will have a user variable, also named fibValue, which will be incremented by 1, upon a loss, and so, in this instance, fibValue will be set at 3, which means fibonacci(1,3,0) equals 2, i.e. the next increment, and we start the sequence, at index of 2 - simple enough...

There are a couple of questions I have here, to ask if what I am looking to do is logically correct, and more importantly, should workout...

So, I am planning to use this in Tennis matches, and as I want to have 1 bet active at any point, I will run a trigger which will get me the first matching selection, and I THINK I need to use the Execute status as 'once per sports event', and once I find a qualifying match, I will place a bet, and then write the ["sel_name"] to a file, called placedBets...

I then want to have a trigger to check for any active bets, and so I was thinking of having a conditional that will check the placedBets file, and see if any selections in that file are active bets - i.e. not settled yet, maybe by setting a user variable, whose value is set to true, with the condition where the selection is present in the file placedBets, and it currently has a matched bet..

So, my user variable, will be set as follows:

Name activeBet Value true
Selections First Matching Selection
Markets Tennis Matches
Execute once per market

conditionals
Selections name is in file ....placedBets.txt
and Selection's Number of Matched Lay Bets is greater than 0

It seems a little clumsy, and I have no way of identifying if activeBet is false, unless there is a way in the value section to do the conditionals, but I really would not know how to do that...?


So I am a little stuck on how to achieve my requirement.

Thanks for reading, any help is appreciated

  • Administrator
  • Posts: 8824
  • Gender: Female
*
Re: Check for other bets
« Reply #4 on: 10 Oct 2019, 08:07 »
Perhaps you'd better create a trigger request for us to look into it, as your question seems to be more complex.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 314
Re: Check for other bets
« Reply #5 on: 10 Oct 2019, 09:00 »
Hi Oxa,

I appreciate my question may seem complex, but if we bring it back to basics, I really want to create something that will allow me to discover if any other bets are present in this particular market type - so, in this instance, it is tennis. I would prefer not to have a variable to use for this detection, because, at this time, I am constantly developing, and as a result, when I add in new things, I have to reload, and as a result of the reload, the counter variable is reset to its original value.

I would prefer a more elegant solution, such that no matter how many times I reload, there will still be bets present, and I want to just check if there are any bets, and there does not seem to be a way to detect this..

So, given we have match A and match B, both of match A and B qualify for a bet, and match A starts 10 minutes before match B, then match A places a bet, which means we now have a tennis bet. Match B has not started, and its conditionals indicate its a valid bet, BUT, as we already have a bet in place, I want to have a trigger (not a variable) determine if we have any bets in place, and if there are, do not place a bet on match B

The limitation I THINK is in place, is that I can only do things based on 'selection' - so in match A, Djokovic is the bet placed, this is complete. I am now looking at Match B, I want to check all available tennis matches to see if there is a bet placed. In this case, we have a bet on Djokovic, but in match B, I cannot query the Djokovic bet, because using the conditional "Selection's number of matched lay/back bets is greater than 0" - will equate to true, because we don't have any bets placed in match B, and as a result, a bet will be placed, because one of the players in Match B qualifies.

I simply want to check if there are any other bets placed OUTSIDE the particular match I am concentrating on - I need to know how to do this. Surely there is a way for me to be able to do this? I would have to argue the case that this is a reasonable requirement. In my case, I want to setup a staking plan, based on ONE BET AT A TIME. That part is easy, but I am struggling to work out how to detect if there are any bets present, and if there are, don't place any further bets - very simple, but at the same time, impossible to do - UNLESS I have missed something, and someone reading this has a solution?

  • Administrator
  • Posts: 8824
  • Gender: Female
*
Re: Check for other bets
« Reply #6 on: 10 Oct 2019, 10:46 »
Then try to make use of the bet count variables.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 314
Re: Check for other bets
« Reply #7 on: 10 Oct 2019, 12:08 »
OK, thanks for your answer...

I am aware that I can use that, but this is not going to solve my problem. I ONLY want to get the bets placed in TENNIS. By using the above, it will give me bets placed in ALL markets. My system is specific to Tennis. I use multiple strategies, Horses, Football, Tennis, Greyhounds, maybe more, and if I have a bet on each, then the variables above will not give me bets specific to Tennis. Hence my question - I want to know how to check how many bets specific to Tennis only, and if I use a football strategy, I want to know how many bets are placed specific to football

  • Administrator
  • Posts: 8824
  • Gender: Female
*
Re: Check for other bets
« Reply #8 on: 10 Oct 2019, 13:32 »
OK, then there is currently no ready solution for your needs.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

 

Please note, BetFair is seems to be currently OFFLINE