Thinking and thinking but not coming up with solution.. How to calculate bets for 2 legged arbs considering betting limits on both bookmakers. For example:

I have following odds

odd1 1,699

odd2 2,499

Example bet limits

Bookmaker Limit1 15

Bookmaker Limit2 12

odd to percent1 1/1,699 = 58,9%

odd to percent2 1/2,499 = 40,0%

total arb percent 58,9%+40,0%=98,9%

And last find stake proportions. Percent of percent

stake1percent 58,9% / 98,9%=59,5%

stake2percent 40,0%/ 98,9%=40,5%

Now considering I have limit. I choose smaller limit as bet2 so..

bet1=X

bet2=12

Total stake is

totalstake=bet2/stake2percent=12/40,5%=29,65

but now when calculating bet1

bet1=totalstake*stake1percent=29,65*59,5=17,65

Its bigger than my limit 15. Is it possible to account other limit to calculation, so I dont have to recalulate it every time?