There is no guarantee that you will have the result of the previous race before you bet on the next one. Races often have a delayed start, there may be a steward's inquiry, the ambulance might have taken a jockey to hospital. Also Betfair may delay in settling a race on an arbitrary basis.
So your triggers need to be powerful enough to cope with almost any eventuality. I presume you need the previous result for staking purposes. If the race goes in-play then in most cases you can determine the winner by looking at which horse had the lowest last traded price at suspension - this should work most of the time. You can wait for the race to settle normally, but if that fails you can then use a trigger to look at the last traded price and fire it a few seconds before your staking triggers operate.