The penny has dropped.
We're going backwards and forwards because Test Mode doesn't distinguish between:
the existing bets (bets placed prior to a test bet being made)
and new bets (bets placed after a test bet is made)
Distinguishing between the two will solve 99.7% of Test Modes' problems.
A time reference should do the trick.
e.g. bu_laytime & bu_backtime
i.e.
MAXV(last_traded,back_price) >= bu_backp = bet matched @
IF((now_time-bu_backtime)/0.00001157<3,MAXV(last_traded,back_price),bu_backp)
MINV(last_traded,lay_price) <= bu_layp = bet matched @
IF((now_time-bu_laytime)/0.00001157<3,MINV(last_traded,lay_price),bu_layp)
(Don't be scared the above formulas are pretty simple)
In English,
if a test bet is less than 3 seconds old (a new bet)then it is matched to existing bets
and the matching price will be last_traded,back price or lay price.
once a test bet is older than 3 seconds (an old bet) it is matched to new bets
and the matching price will be bu_backp or bu_layp
So the above formulas or something similar should resolve nearly all problems
with Test Mode.
Tim(WellDoneSoft support) could you please ensure that the programmer
responsible for Test Mode gets a copy of this message please.
Then hopefully we'll get a patch for Test Mode relatively quickly.
regards
Apples999
N.B the 3 seconds is an arbitrary value feel free to bench test other values.