Author Topic: [TR] Use start price when back or lay  (Read 1187 times)

Tags:
  • All members
  • Posts: 57
[TR] Use start price when back or lay
« on: 22 Sep 2016, 04:33 »
Hi, here is the trigger I am after.

The aim of this trigger is to take advantage of the difference between the current best back/lay price and the expected BSP. If expected BSP (or near SP) is lower than back_price then place a back bet at back_price and lay at the SP. If the advantage is the other way round then lay at lay_price and bet at SP.
•   This bet would occur once/market for each runner.
•   The bet will only trigger if the near SP is X ticks above or below the back/lay_price. Number of ticks would need to be a constant so I can change it.
•   The difference between the return and liability would also need to be a constant so I can change it.
•   The amount of return or liability would need to be a constant so I can change it.
•   Trigger would fire as close to the off as possible. Not sure if BF gives any indication of when they are about to jump (outside of the scheduled jump time) but if so then the trigger should fire as close as possible to the actual jump.
•   If the whole bet is not matched then cancel whatever has not been matched. The subsequent bet at SP will be dependent on how much has been matched.
Eg
The current best back price for horse #1 is 2.50 and the near SP is 2.46.
Back the horse so it returns $250 (as specified by constant) i.e it will be $100@ 2.50.
Immediately place a lay bet @ SP so it has a liability of $250 minus 1 (as specified by constant). If only part of the back bet was matched, say $60 @ 2.50, then the liability of the lay bet @ SP must be (60 x 2.50) – 1, or 149.
In the same race horse #2 has a best back price of 3.5 and a near SP of 3.56. In this case lay the horse to have a liability of $250 and back it @ SP to return 250 plus 1. If the lay bet could not be fully matched immediately then the SP back bet is dependent on the liability on the lay bet and would have a return equal to the liability plus 1.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Use start price when back or lay
« Reply #1 on: 25 Sep 2016, 14:04 »
Hello!

Please see your triggers attached. I have added all the constants you mentioned in the description.

The triggers will determine the closeness to the start by checking the Race Status, which is available for all UK races and some RSA/AUS races.

I presume by liability you really meant the negative return, i.e. lay_price*lay_amount instead of (lay_price-1)*lay_amount, which is the actual formula for the liability. Since you stipulated the return for the back bet (back_price*back_amount), I applied the same formula to the lay bet.

Please make sure you've tested the triggers in Test Mode.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

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

  • All members
  • Posts: 57
Re: [TR] Use start price when back or lay
« Reply #2 on: 26 Sep 2016, 07:08 »
Thanks Oxa,

Like you said, the race status is not available on all australian races. I will keep that part of the trigger for the main race meets but was planning to delete it for the everyday meets that don't have it. When keeping it in there the trigger just does not fire if that race status is not available.
I deleted the race status conditions in order to test it, however when I did that to make it fire, it placed a back bet on EVERY runner at the current back price.

This is not what I wanted. I want it to fire only when the last matched back or lay price is r_ticks above or below the near_SP and then place an opposing bet at the SP.

Would taking out the race status conditions affect the trigger at all?


  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: [TR] Use start price when back or lay
« Reply #3 on: 26 Sep 2016, 09:00 »
I have amended the triggers so that they fire at a certain time left till the beginning of the race (see the new constant mins_before_off).

As for the bets being placed on all selections -- it is true that on some races there are many selections that qualify for your conditions, i.e. their near SP is less than back price or higher that lay price. Adjust offset_tcks to reduce the number of these selections.
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