I have tried the formula
If(((init_bet + (currentloss/steps)/(1-commission)) < max_liab),(init_bet + (currentloss/steps)/(1-commission)),max_liab/lay_price)
but get an error. The trigger log gives the following
23:45:00 All bets will be discarded.
23:45:00 Error in the trigger expression of price or amount for selection "Loving Your Work".
23:45:00 Selection: Loving Your Work, initial expr.: If(((init_bet + (currentloss/steps)/(1-commission)) < max_liab),(init_bet + (currentloss/steps)/(1-commission)),max_liab/lay_price), intermediate: If(((5+(0/5)/(1-0.05))<750),(5+(0/5)/(1-0.05)),750/14.50), final: If((5<750),5,51.72413793).
23:45:00 Selection: Loving Your Work, initial expr.: lay_price, intermediate: 14.50, final: 14.50.
23:45:00 Condition is: TRUE. valid for 1 selections: Loving Your Work.
23:45:00 Checking condition or Trigger Place bet Number of runs is equal to 0 overall.
23:45:00 Condition is: FALSE.
23:45:00 Checking condition or Previous Triggered Event's Status is Settled.
23:45:00 Condition is: TRUE. valid for 1 selections: Loving Your Work.
23:45:00 Selection: Loving Your Work, initial expr.: min_laybook_perc, intermediate: 95, final: 95.
23:45:00 Checking condition and Market's Lay Book % is equal or greater than min_laybook_perc.
23:45:00 Condition is: TRUE. valid for 1 selections: Loving Your Work.
23:45:00 Selection: Loving Your Work, initial expr.: max_backbook_perc, intermediate: 105, final: 105.
23:45:00 Checking condition and Market's Back Book % is equal or less than max_backbook_perc.
23:45:00 Condition is: TRUE. valid for 1 selections: Loving Your Work.
23:45:00 Selection: Loving Your Work, initial expr.: mlp, intermediate: 50, final: 50.
23:45:00 Checking condition and Selection's Lay Price is equal or less than mlp.
23:45:00 Condition is: TRUE. valid for 1 selections: Loving Your Work.
23:45:00 Selection: Symphony Of Pearls, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Worthy Spirit, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Ferngrove, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Pretty Mobile, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Stoneham, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Loving Your Work, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Fennann, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Officer Drivel, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Gladstone, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Ravenous, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Selection: Nyanza, initial expr.: sr, intermediate: 6, final: 6.
23:45:00 Checking condition and Selection's Rank is equal to sr.
23:45:00 Checking market "Horse Racing / GB / 23:45 Hunt 2nd Nov".
23:44:56 Going to LAY on 1 selections: