Author Topic: Help with an inplay catch trigger  (Read 2107 times)

Tags:
  • Élite
  • Posts: 431
*
Help with an inplay catch trigger
« on: 27 Feb 2013, 12:44 »
Hi, I wonder if anyone has any good ideas to help with this.  I have a strategy that requires a back bet to be placed in play at a given price.  However I am expecting that due to the fast changing nature of in play prices sooner or later this bet will not get matched and will leave me exposed to a big loss.  I therefore want a "belt and braces" approach so that if the price I want is not achieved I recalculate the stake and place a bet at a lower price.

(I dont want to go for "best" price straight away as I can normally improve on that.)

What I need to do is say "if the price is lower than my trigger point, and the hedge has fired but is unmatched, then cancel the unmathced and try again at a lower price and repeat until matched".  However I do not want to get multiple backs so I was thinking of having a short delay since the orginal hedge fires.  Can this be done?  I know you can have a time delay from last matched, or last unmatched bet as those are events that can be defined, but how can I say "....1 second since trigger Y fired"?

I know in theory it may appear to be sufficient to say "seconds since last unmatched bet" but I am concerned that the second hedge attempt may fire in the interval between the initial hedge and the unmatched bet appearing in the bet list, due to the response time of the API etc.

Ant thoughts?

Thanks

Alfaman

  • Moderator
  • Posts: 3597
*
Re: Help with an inplay catch trigger
« Reply #1 on: 27 Feb 2013, 13:43 »
Hi
I think what you are after is a “Fill or Kill” type of approach. The following link gives some examples of these triggers. The repetitive attempts work well in pre-off markets. For example, if you watch the pre-off prices in Greyhounds from 5 minutes out, you will see many such bots operating. Each one offers a better price than the last, and then when they cancel, the price goes back.
http://marketfeeder.co.uk/solutions/miscelaneous-betting/matching-bets/

I think the problem you might find is that because it is inplay, the execute no more often than 1.0 sec will be too slow. To speed it up, you might try “specific number of times” and set it to something like 50000.
Also consider offering a price x ticks between your trigger point and current best.

Hope this helps a bit.
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