Hi londolozi and mcbee
thanks very much for your help. Both formulas produce the correct result.
For info this is what I am trying to achieve.
The trigger in this topic:
http://community.welldonesoft.com/triggered-betting-10/martin_overs/There is a lay bet in each of the markets here which recovers the loss from the previous market.
I want to green up if:
what if p/l is greater than all losses so far
selection's trigger expression <what if p/l> is greater than (init_bet - (ou0_market_parent_id_1_profit_loss + ou1_market_parent_id_1_profit_loss + ou2_market_parent_id_1_profit_loss))/(1-commission)
mcbee's formula in the condition
selection's trigger expression (((bm_laya/(back_price/bm_layp))*(back_price-1))-(bm_laya*(bm_layp-1))) is greater than (init_bet - (ou0_market_parent_id_1_profit_loss + ou1_market_parent_id_1_profit_loss + ou2_market_parent_id_1_profit_loss))/(1-commission)
londolozi's formula in the condition
selection's trigger expression (bm_laya*(bm_layp-1)*-1)+((back_price-1)*(bm_layp/back_price*bm_laya)) is greater than (init_bet - (ou0_market_parent_id_1_profit_loss + ou1_market_parent_id_1_profit_loss + ou2_market_parent_id_1_profit_loss))/(1-commission)
thanks chaps. I will test them as soon as some markets are inplay
mcbee - wish you well soon.
PS it strikes me that the "What If P/L" would be very useful to have as a variable for use in triggers. I will post accordingly in suggestions.