I use the following code to keep a worksheet updated with bet info.
- Code: Select all
''' Get Matched Stake and place on selections Sheet
wS.Cells(p1, 17).Value = bet.betStatus
wS.Cells(p1, 18).Value = bet.matchedSize
wS.Cells(p1, 19).Value = bet.remainingSize
wS.Cells(p1, 20).Value = bet.avgPrice
wS.Cells(p1, 22).Value = Format(Now, "hh:mm:ss")
''' Check For Cancelled And Re-bet
If bet.betStatus = "C" Then goReBet (ref)
at 8.02am this code reported the following
- 14:40 BLUE BAJAN YORK 7978546879 M 3.00 0.00 38 08:02:00
16:55 TEPMOKEA YORK 7978548529 U 0.00 1.50 0 08:02:00
16:55 KUDU COUNTRY YORK 7978548530 M 1.50 0.00 24 08:02:00
Looking at the top line the m is "cells(p1,17)" ie bet status. The 3.00 is matched size and the 38 is average price.
My question is if the bet is matched at average price of 38 how can it be settled at average price of 34.1 ? this is reported by the same code
- 14:40 BLUE BAJAN YORK 7978546879 S 3.00 0.00 34.01 19:24:27
16:55 TEPMOKEA YORK 7978548529 S 1.50 0.00 6.6 19:24:27
16:55 KUDU COUNTRY YORK 7978548530 S 1.50 0.00 22.3 19:24:27
as you see looking at the top line the S is the betstatus, then the 3.00 is matched size, then the 0.00 is the remaining size and 34.01 the average price.
Duncan
and yes I know it does'nt matter cos they were 2nd 2nd and 4th, so loosing bets!