There is not a simple instruction that does this.
You would need to sort by price order and write the code to do this.
Happily, there is a sheet here that sorts into favourite order:
viewtopic.php?f=31&t=7397
You would also need to decide what to do when there are two favourites at the same price.
Then write a conditional flag that sets ten minutes before the race. This can trigger your bet instruction. Decide how you're going to apply to all races when some are only five mins apart. If you intend to leave this running on it's own you will also need to build in some kind of race delay detection. If you are using Guardian to monitor the races you will need to set the refresh rate accordingly.
Hopefully this is enough to get you started. A bit of trial and error and I think you could probably get there.
Good luck in developing this. Feel free to post the sheet up here when you complete it.