Author Topic: Bets duplicating  (Read 1625 times)

Tags:
  • All members
  • Posts: 5
  • Gender: Male
Bets duplicating
« on: 21 Jan 2018, 08:50 »
Hello,
I faced a problem with bets duplication in triggered betting.
I read all topics regsrding this issue and and really still has no good idea of how to avoid duplicating.
I tried all suggested methods - even waiting for 15 secods between triggers checks(market refresh time is 3sec - trigger waits 5! times longer ).
And yesterday I've got another duplicated bet.
I read that you can't check the status of bet sent, but Betfair has the 'reference' number for ANY bet it has got to process. In any state: matched/unmatched/lapsed or voided.
I am sure than it is  easy enough to implement some bet option(or even settings variable) 'Wait for bet is processed for {N} sec', which will wait for ANY changes in bets state for the selection matched for the bet. At least - the count of bets(of any type) on selection  must changed in this period of time.

It could solve 99.9% of bets processing problems independently of the reason - betfair or network delays etc.

Sure, the best way is the ability to assign some string of user's betID(independently of betfair unique ref. num) to any bet sent via Betfair API, but it could be done by Betfair only.

And just for now - could you please provide some good method to "wait for N seconds" after triggered bet action and not set the whole trigger to check conditions too rare?

  • All members
  • Posts: 905
Re: Bets duplicating
« Reply #1 on: 21 Jan 2018, 10:01 »
Have you tried conditions such as:  Selections back matched is equal to 0
                                                         Selections back unmatched is equal to 0 ?

  • All members
  • Posts: 5
  • Gender: Male
Re: Bets duplicating
« Reply #2 on: 21 Jan 2018, 10:39 »
I have tried all mentioned in topics and all I've built by myself solutions.
Currently in my triggers I have conditions:
back_matched - {my_own_bet_size} > 4 -> action "cancel then back {unmatched volume}"

trigger executes not often than 15 seconds
market refresh time is 3 seconds

previously I tried to set conditions:
Number of Matched Back bets == 0
and
Number of Unmatched Back bets == 0
And I got duplicates and in addition unmatched bets volumes left intact(and I nedd them to be matched by a bit less price). This is the reason  why I changed the condition to the current one.

And in case set too big trigger's "wait between check" - you may loose some good price in trading.

Currently I am testing the method:

Trigger0(no conditions)-> reset uservar_trade_timeout variable
   (exec not often than 2 sec)
Trigger1(trade condition)->Action cancel then back {unmatched volume}(...) 
                            + action set uservar_trade_timeout variable = 30
   (exec not often than 3*refresh_inplay + uservar_trade_timeout variable)

hopefully it will work

  • All members
  • Posts: 5
  • Gender: Male
Re: Bets duplicating
« Reply #3 on: 21 Jan 2018, 10:55 »
Upd:
It does not work.
Trade trigger next execute not in:
3*refresh_inplay + uservar_trade_timeout seconds, but in
3*refresh_inplay seconds
for unknown reasons new value of uservar_trade_timeout variable is ignored

  • All members
  • Posts: 5
  • Gender: Male
Re: Bets duplicating
« Reply #4 on: 21 Jan 2018, 11:40 »
Upd:
Trigger0-> reset "wait after bet" timeout (waitbetdone_timeout)
  (exec: 3*inplay_rate)
Trigger1(check trade conditions)->set "wait after bet" timeout (waitbetdone_timeout)
  (exec: 3*inplay_rate)
Trigger2(trade if "wait after bet" timeout (waitbetdone_timeout) > 0)->cancel then back {unmatched rest}
  (exec: 3*inplay_rate + waitbetdone_timeout)

Trigger3 log:

13:18:51Selection: Over 0.5 Goals, initial expr.: waitbetdone_timeout, intermediate: 55, final: 55.
13:18:51Condition is: TRUE. valid for 1 selections: Over 0.5 Goals.
13:18:51Selection: Over 0.5 Goals, initial expr.: back_price, intermediate: 1.78, final: 1.78.
13:18:51Selection: Over 0.5 Goals, initial expr.: bet_size - back_matched, intermediate: 15-0.0000000, final: 15.
13:18:51Going to BACK on 1 selections:

      Over 0.5 Goals, $ 15,00 at 1.78;
13:18:58Checking market "Soccer - Todays Fixtures / Sevilla C v CD Guadalcacin / First Half Goals 0.5".
13:18:58Checking condition and Market's Betting Code is First Half Goals (Soccer) 0.5.

So, Trigger3 gets the correct waitbetdone_timeout, intermediate == 55 but totally ignores it inside
"execute not often than 5 + waitbetdone_timeout" parameter - it starts next execution already in a 7 seconds(from log)
And yes, in case of action "set waitbetdone_timeout = {another_triggerconst_value}" it becomes even much more fun:

12:46:22Checking condition and Selection's Trigger Expression waitbetdone_timeout is greater than 0.
12:46:22Selection: Over 0.5 Goals, initial expr.: waitbetdone_timeout, intermediate: 0_const_const_const, final: 0_const_const_const.
12:46:22Selection: Under 0.5 Goals, initial expr.: waitbetdone_timeout, intermediate: 0_const_const_const, final: 0_const_const_const.
12:46:22Condition is: FALSE.

  • All members
  • Posts: 905
Re: Bets duplicating
« Reply #5 on: 21 Jan 2018, 12:53 »
OK, this looks as though it would be best solved by a trigger request here:
https://community.welldonesoft.com/marketfeeder-make-me-a-trigger/

  • Moderator
  • Posts: 3605
*
Re: Bets duplicating
« Reply #6 on: 21 Jan 2018, 13:27 »
Hi
It would be better to repeat the trigger block, not the betting trigger itself. Use a Close Block trigger and stipulate the precise conditions for a repetition.

This article describes how, maybe you can use the example trigger in the article as a framework and modify it for your purpose:
https://marketfeeder.co.uk/learn/articles/how-to-repeat-actions-in-the-same-market/

and in your settings check the frequency of updating the list of bets, the default setting of 3 secs should be fine if you repeat the block at 5 secs. 
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