hi mcbee,
Thanks for the response.
The idea is, I don't want more than 3 bets in the same race. 2 is fine, 1 is fine, but 3 is the MAX. The min number of runners is 7, and after watching for some time, I have found a way to allow bets to be layed, once the price has been rising. The detail is not important, as this part is working perfectly, UNTIL I saw a race which had 5 bets placed, as the criteria used was satisfied in all 5. The problem I have is that I don't want more than 3 bets.
I think I have the logic correct in using (matched count + unmatched count) <= 3
Also, given that one of my 'try-out' triggers, is that I will ask for 1 tick below, and the criteria are satisfied, it will ask for 1 tick below lay_price, which will give me an unmatched lay bet, and potentially at some point, this bet will get matched. Whilst this is going on, I may have achieved another matched bet, so I will have 2 matched bets, and if another is placed, and it is unmatched, then market_mlnum = 2, and market_ulnum = 1, and as such, there cannot be any more bets placed, as the sum of market_mlnum + market_ulnum = 3
BUT, I want to check that the matched bets AND the unmatched bets, are no more than 3, so, say 1 matched and 2 waiting to be matched, or any combination, as long as the sum total of bets les than or equal to 3.
Which gave me the thought of using (market_ulnum + market_mlnum) is less than or equal to 3, where the sum of these 2 values will give me the total bets, be that matched or unmatched, which is why I used the above.
The unfortunate thing is, I don't know how to get the number of ALL bets, and use it in a conditions.
I am sorry that I am quite verbose, but I think its a simple requirement I am asking for, but I just am not sure how to achieve it.
Thanks for any help
Mark.