No worries. I will.
Check the market is in guardian for it to have a full effect and record all data.
            
			
									
									
						Capture Betfair Charts
Yeah - I've had it in guardian, looking at the final 5 minutes, but it's not doing what I want/expect it to doRealrocknrolla wrote: ↑Sat Apr 03, 2021 9:35 amNo worries. I will.
Check the market is in guardian for it to have a full effect and record all data.
- Realrocknrolla
- Posts: 1910
- Joined: Fri Jun 05, 2020 7:15 pm
Which markets? As in sports?Anbell wrote: ↑Sat Apr 03, 2021 9:40 amYeah - I've had it in guardian, looking at the final 5 minutes, but it's not doing what I want/expect it to doRealrocknrolla wrote: ↑Sat Apr 03, 2021 9:35 amNo worries. I will.
Check the market is in guardian for it to have a full effect and record all data.
I put this code together which from inspecting the byte data it does start to download a jpg based image but the file size is larger than if I was to just download the image directly from betfair. At a guess it's because it's not logged into betfair that it doesn't like it.
Feel free to play with it
            
			
									
									
						Feel free to play with it
Code: Select all
Private Const URL_MAIN As String = "https://xtsd.betfair.com/LoadRunnerInfoChartAction/"
' https://xtsd.betfair.com/LoadRunnerInfoChartAction/?marketId=180655630&selectionId=127991
' Paul Arrowsmith
' 03.04.2021
Public Sub gFetchChart(ByVal pstrMarketID As String, _
                       ByVal pstrSelID As String)
    
    Dim strURL As String
    Dim objWs As Excel.Worksheet
    Dim strFile As String
    Dim b As Byte
    Dim lngFileID As Long
    
    Dim xmlRequest As Object
    Set xmlRequest = CreateObject("MSXML2.XMLHTTP")
     
    strURL = URL_MAIN & "?marketId=" & pstrMarketID & "&selectionId=" & pstrSelID
    
    ' Request the hyperlink that generates the betfair graph
    
    xmlRequest.Open "GET", strURL, False
    xmlRequest.setRequestHeader "Content-Type", "image/jpg"
    xmlRequest.send
    
    ' Need to wait to ensure everything downloads
    Do While xmlRequest.readyState <> 4
        DoEvents
    Loop
    
    ' Get file ref, kill file if it already exists and then write out new file
    lngFileID = FreeFile
    If Dir("D:\Trading\BF Download Test\" & pstrMarketID & ".jpg") <> "" Then Kill "D:\Trading\BF Download Test\" & pstrMarketID & ".jpg"
    
    Open "D:\Trading\BF Download Test\" & pstrMarketID & ".jpg" For Binary As #lngFileID
    Put #lngFileID, , xmlRequest.responseBody
    Close #lngFileID
    
    Set xmlRequest = Nothing
    
       
'    Set objWs = ThisWorkbook.Worksheets("Market Charts")
'    objWs.Shapes.AddPicture strURL, msoTrue, msoTrue, 100, 100, 100, 100
    'Set xmlRequest = Nothing
    
End Sub
Cheers RRR, I'll take a look at that.Realrocknrolla wrote: ↑Sat Apr 03, 2021 8:22 amDerek27 wrote: ↑Sat Apr 03, 2021 5:05 amThey forgot to ask for permission to withdraw funds from your account!ShaunWhite wrote: ↑Sat Apr 03, 2021 4:44 am
Some pretty bold claims there for what charts can tell you, and do people seriously click through this? !!!!
Screenshot_3.png
Not for me that one. It amazes me that people still use BF charts. They are absolutely pony compared to what you can build in the advanced charts.
Attention to detail goes along way.
viewtopic.php?f=67&t=22921
Try this. You can adjust time frames accordingly.




