by pugs » Wed Jan 16, 2008 2:54 am
I am trying to write a trigger that will level profit/loss but i just can’t fathom out the maths.
IF(AND(-profit_loss>5, back_unmatched>=0), IF(lay_matched>0, -profit_loss/(r_ticks(lay_price,-1) -1), 2), 3)
The bet amount trigger above leave’s all profit/loss on all other selections, plus if I have laid 2 or more selections it needs to fire several times to remove excess liability. I have tried messing about with percentage calcs (lay price matched/lay price now) (lay amount/amount I need to lay) but I just keep hitting a brick wall. I need to insert my calculation in place of “-profit_loss” but is there a set formula for leveling profit/loss, and if so can anyone help. Please ignore the 2 and 3 at the end, I only put them there to fire fathom bets to cancel any unmatched.
Thanks for reading and any helpful advice.