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.