Hi Betfair winner,
I think I have found a hint for double bets in V7.
As a guideline, in V6 refresh rate should be at least double of trigger refresh rate. If you setup trigger "repeat no more often than 20 Seconds" refresh rate should be 10 seconds or less. I did not unterstand this restriction because V6 worked fine even if refresh rate is 10 times the trigger repeat intervall if you refresh list of bets simultanously with refreshing the market. (I only use this setting, no idea what happens if list of bets is refreshed independent from markets.)
In V6, trigger action was launched immediately after refreshing markets and bets if trigger repeat interval was less than market refresh. Additionally trigger did no action if it was due to execute first time. The line in V6 logfile "waiting for next repitition..."
For example: Trigger repeat interval was 20 seconds, market refresh (list of bets refreshes simultaneously with markets) is 120. In V6, the first trace in logfile was 120 seconds after start of trigger, saying "waiting for next repitition.....". Next trace in logfile 240 seconds after start of trigger.
If you transfer the trigger with same settings into V7, there is a trace in logfile every 20 seconds! I mailed this issue to support, if V7 does not care about the refresh rates of markets and list of bets, this is probably the reason for some of your multiple bets.
I protect my triggers against double bets in 2 ways:
- Even market refreshes are reserved for lay actions, odd market refreshes are reserved for cancel actions. This doubles the time between 2 lay actions.
- Calculate a "hash value", and do no action if current hash value is equal to previous hash value or hash value is 0. Hash value is for example sum back_price*back_amount. In this case, if hash value does not change, there was no market refresh since last trigger execution, or no new match or no new bets in market.
But if you bet only on "predefined" selections, mcbee's hint is better.
Martin