- Sun Mar 20, 2022 11:19 am
#26392
I would like to carry out the following on a football match:
Back a home team with 1 unit and if the score goes 1-0 I want to lay the home team with the same 1 unit stake so that all profits are left on the home team (scratch on away win and draw). I believe this is 'closing' the position.
However if the score goes 0-1 I want to lay the away team with 1 unit. Then if an equaliser (any score) comes I would like to hedge to achieve the same as the 'cash-out' button does on the Betfair interface.
I have created 2 bots to do this (attached). Bot 1 backs the home team and lays them if 1-0 happens. Bot 2 lays the away team if 0-1 happens and hedges if at any point there is an equaliser. In any case I wait 120s for the market to settle before doing anything.
I am having two problems:
1. On some rare occasions at 1-0, Bot 1 does not execute the close specified in the Hedging settings. After checking matches I can see this is not because of any liquidity issues or because another goal happening before 120s. Can you see any reason why this might be the case?
2. The hedge that occurs using Bot 2 is not functioning like the 'cash-out' button. It is not leaving equal profits on all outcomes. Do you know why this might be?
Thanks.
Back a home team with 1 unit and if the score goes 1-0 I want to lay the home team with the same 1 unit stake so that all profits are left on the home team (scratch on away win and draw). I believe this is 'closing' the position.
However if the score goes 0-1 I want to lay the away team with 1 unit. Then if an equaliser (any score) comes I would like to hedge to achieve the same as the 'cash-out' button does on the Betfair interface.
I have created 2 bots to do this (attached). Bot 1 backs the home team and lays them if 1-0 happens. Bot 2 lays the away team if 0-1 happens and hedges if at any point there is an equaliser. In any case I wait 120s for the market to settle before doing anything.
I am having two problems:
1. On some rare occasions at 1-0, Bot 1 does not execute the close specified in the Hedging settings. After checking matches I can see this is not because of any liquidity issues or because another goal happening before 120s. Can you see any reason why this might be the case?
2. The hedge that occurs using Bot 2 is not functioning like the 'cash-out' button. It is not leaving equal profits on all outcomes. Do you know why this might be?
Thanks.