Author Topic: Triggers In Play [TCKTWYJ-862757]  (Read 7736 times)

Tags:
  • Administrator
  • Posts: 8821
  • Gender: Female
*
Triggers In Play [TCKTWYJ-862757]
« on: 09 Sep 2013, 10:54 »
Copied from a support request:
Quote
Is it possible to develop a trigger for the following horse racing scenario during IN PLAY :

I want a trigger during in-play when a horses LAY odds go down to say 1.01 and the trigger LAYS the next best LAY odds available for another horse. It lays 1 horse only.

eg - in a typical race with 6 runners horse A is winning towards the end of the race and its  LAY odds hit 1.01. On that signal the trigger kicks in and immediately LAYS horse B who is second with LAY odds of 40.0. It lays horse B when horse A's Lay odds hit 1.01 and thats it no more bets on that race.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 6
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #1 on: 09 Sep 2013, 12:12 »
I've done something like this before.

I had an In-Play Trigger for Second Favorite.
Laying £2 at Price 40
it would trigger when r_1_lay_price = 1.01

Does this help?

  • Moderator
  • Posts: 3597
*
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #2 on: 09 Sep 2013, 12:35 »
Hi
Similar to the post by kallixx, attached is a trigger which will:
lay 2nd favourite
at best available price
if favourite's lay price is equal to 1.01
There is a constant you can set for maximum lay price on second fav

If you want to specify a price to lay at, change "best" for your price, and ensure the constant is set accordingly.

Please use test mode to try it out.
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: 82
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #3 on: 10 Sep 2013, 15:48 »
Hi,

I have been trying this with the stake of 0.02 and constant price of 45.0 with the max lay price of 82.0 when the fav price is 1.02, but in all the races today the bet has not fired.
I think the reason is because when a horse ends up 1.02 the 2nd fav is never below 80.0 and the bet therefore doesnt go?

Is this the case, or have I got it setup incorrectly? (Maybe this bot is too slow to react in the market...)

Any advice would be appreciated as I think its a good idea.

  • Moderator
  • Posts: 3597
*
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #4 on: 10 Sep 2013, 17:02 »
Hi
If you work to an exact 100% book (on the first 2 favs) and calculate the opposite lay price to current back price using this formula: 1 / (back_price -1) +1

1 / (1.01 -1) +1 = opposite lay price of 101.00
1 / (1.02 -1) +1 = opposite lay price of 51.00
1 / (1.03 -1) +1 = opposite lay price of 34.33
1 / (1.04 -1) +1 = opposite lay price of 26.00
1 / (1.05 -1) +1 = opposite lay price of 21.00

I think you need to move your trigger activation to between 1.03 to 1.05 fav back price to have any chance of being matched. Even further if you take into account transaction latency time. Problem is risk increases.
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: 905
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #5 on: 10 Sep 2013, 18:05 »
It works in test mode using a back price of 1.02 or less and a lay price for the second favourite of <60.

When using stakes below the minimum, which I agree you would need to use in early live tests, there will be more delay as it takes 3 transactions to successfully place the small bet.

  • All members
  • Posts: 82
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #6 on: 10 Sep 2013, 21:34 »
It works in test mode using a back price of 1.02 or less and a lay price for the second favourite of <60.

When using stakes below the minimum, which I agree you would need to use in early live tests, there will be more delay as it takes 3 transactions to successfully place the small bet.

I thought I read somewhere that when using the API you can place bets let than £2 minimum and it just goes through, or does it have to do it the same way?

  • All members
  • Posts: 905
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #7 on: 10 Sep 2013, 22:44 »
The bot handles small bets seamlessly, but it needs 3 transactions to achieve it rather than one for a normal bet, so this further delays live bet matching which is a serious problem with in-play betting.

  • All members
  • Posts: 82
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #8 on: 11 Sep 2013, 09:58 »
Would you expect the trigger to fire if I did £2 as the stake then?
As I am just trying to get it to fire so I can see it in my lapsed bets or whatever in history so I can do some analysis and see what price I need to be at and everything.

  • All members
  • Posts: 905
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #9 on: 11 Sep 2013, 11:41 »
I would expect my trigger to fire with £2 bets, but possibly not using a back price of 1.02 or less.  So this threshold may need to be increased in steps of 0.01, until you find a suitable compromise that gives enough bets.  It is better to enter a lay order at the max. price you are happy with eg. 60.  Also use the fastest refresh rate which is 0.2 or 0.3 - check manual.

  • Élite
  • Posts: 431
*
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #10 on: 11 Sep 2013, 14:43 »
A word of warning - 1.01 does not mean it is going to win.

Take Pelmanism in the 15:35 at Doncaster (UK horse win market) today. Pelmanism  got to 1.01 to and Danas Present to 1.02.

Danas Present was trading at 980 just prior to falling right down again - someone may be a very lucky winner there !  winner yet to be announced.

[Post race note:  Excellent Puck won so that was resumably three selections trading at very low prices.  Excelent Puck was trading at 1000 before it won - so there were some lucky in-play punters out there - not me unfortunately]

  • All members
  • Posts: 82
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #11 on: 11 Sep 2013, 15:32 »
What do I need to put into this trigger to cancel the bet after 1 second of being in the market if it does not get matched?

  • Élite
  • Posts: 431
*
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #12 on: 11 Sep 2013, 16:04 »
A cancel trigger with a condition:

Trigger expression    (now_time - bu_backtime) / 0.00001157 is greater than 1

What that says is subtract from the time now,  the time of the last unmatched back,  bet and that gives a number in days since the bet was placed, dividing by the number above converts that into seconds. 

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #13 on: 13 Sep 2013, 13:11 »
Following alfaman's post, there is a variable in MF Pro for the fraction of time equal to a second, minute or hour:

mf_second, mf_minute, mf_hour

So the same condition can be written as:

Trigger expression    (now_time - bu_backtime) / mf_second is greater than 1
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • Élite
  • Posts: 431
*
Re: Triggers In Play [TCKTWYJ-862757]
« Reply #14 on: 14 Sep 2013, 07:37 »
Ah thanks Oxa - I had not noticed those - I am still dawdling in V6 as I still find V7 difficult to do what I want regaring statements, log files and other things and V6 still works well for me.

 

Please note, BetFair is seems to be currently OFFLINE