hi
that is what total_won is for.
so if you want to bet until you have won say 10.00 , in your betting trigger you would have the condition.
and selections trigger expression total_won is less than 10.00
this way if the total profit is less than 10.00 , the trigger will place a bet, if it meets your other conditions, but if the total won/profit equals or goes more than 10.00 , then it stops placing the bets.
mcbee