Hi again mcbee,
Sorry for the long delay in response, but I have not had an occasion where I needed to reset Win/Lose history (which means I have met my pre-set profit targets) for the last few days, but I needed it yesterday.
Luckily, I was watching at the time, and last_lost limit was exceeded, which meant that my trigger should have reset win/lose history, and then my bets would have reduced accordingly.
Initially, it did reset.
total_won, hist_count, last_lost and last_pl all reset to zero, but then for some reason (perhaps when the next race started to be monitored), total_won,last_lost and last_pl all reverted to the previous amounts - total_won and last_pl showed a negative, and last_lost a positive.
As my next bet is based on a recoup of losses (ie total_won is negative), if I hadn't been watching at the time, the next bet would have been sizeable. Luckily, I was able to manually stop the trigger, but I had to stop betting for the day as total_won remained negative and above my preset figure.
The fact that the variables reverted initially seems to tell me that my trigger is at fault. It is the first trigger of many, all of the others following relate to conditions that must be met at each track before a bet is placed (hence a separate trigger for each track on which I want to operate).
This first trigger reads:
reset Win/Lose history globally
All Matching selections
Once per market
All Markets
Selections trigger expression losses is greater than 4
OR Selections trigger expression last_lost is equal or greater than 80
That's all.
If there is no solution to this particular problem, I would want to stop betting for the day if the limits are exceeded.
Sorry to be long-winded about this (I find it hard to explain), but any suggestions would be appreciated.
bobh