by nanook » Thu Jul 03, 2014 6:27 pm
Is it possible to get the maximum price matched using getTradedVolume?
The GetTradedVolumeExample spreadsheet shows how to get the minimum price matched. Here's the code:
Option Explicit
Dim ba As New BettingAssistantCom.ComClass
Dim currentMarket As String
Private Sub Worksheet_Change(ByVal Target As Range)
Dim r As Integer
Dim tradedVolume() As Variant
If Target.Columns.Count = 16 Then
Application.EnableEvents = False
If currentMarket <> Cells(1, 1).Value Then
Cells(1, 25).Value = "Y"
For r = 5 To 50
Cells(r, 25).Value = 0
Next
End If
If Cells(1, 25).Value = "Y" And Cells(1, 27).Value <= 30 Then
For r = 5 To 50
tradedVolume = ba.getTradedVolume(Cells(r, 1).Value)
Cells(r, 25).Value = tradedVolume(0).odds
Next
Cells(1, 25).Value = "N"
End If
currentMarket = Cells(1, 1).Value
Application.EnableEvents = True
End If
End Sub
tradedVolume(0).odds gives the minimum price matched.
What is the equivalent expression for the maximum price matched? Excuse my ignorance if it's obvious. I have been fiddling around with it but can't get it.