Author Topic: Linking to excel  (Read 1390 times)

Tags:
  • All members
  • Posts: 2
  • Gender: Male
Linking to excel
« on: 13 Dec 2017, 11:51 »
I am new to Market feeder pro 8 I cannot link to excel and I cannot get this code below to work which is in the Market feeder pro 8 manual on page 200 I would like to be able to place bets and cancel bets using the example code below please help I have no idea what to do, please give me a detailed example on how to link to excel and get the vba code to work properly many thanks in advance

 Sub Back(marketID As Long, selectionID As Long, price As Double, amount As Double, handicapID as Long)
 Dim feed As Integer
 Dim data As String
 feed = Application.DDEInitiate("FEEDER7", "betting")
 If feed > 0 Then
 data = "back/" & marketID & "/" & selectionID & "/" & price & "/" & amount & "/" & handicapID
 Range("AB1000") = data
 Application.DDEPoke feed, "bet", Range("AB1000")
 End If
 End Sub

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Linking to excel
« Reply #1 on: 13 Dec 2017, 11:51 »
Hello!

The example is somewhat outdated, the program's name is now feeder8, so it should read:

Sub Back(marketID As Long, selectionID As Long, price As Double, amount As Double, handicapID as Long)
 Dim feed As Integer
 Dim data As String
 feed = Application.DDEInitiate("FEEDER8", "betting")
 If feed > 0 Then
 data = "back/" & marketID & "/" & selectionID & "/" & price & "/" & amount & "/" & handicapID
 Range("AB1000") = data
 Application.DDEPoke feed, "bet", Range("AB1000")
 End If
 End Sub

Is it specifically the VBA code that you need to execute, or do you simply need to collect some information from Excel and process it in MF Pro?
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

  • All members
  • Posts: 2
  • Gender: Male
Re: Linking to excel
« Reply #2 on: 13 Dec 2017, 11:51 »
Yes I specifically need the vba code to execute, could you please give me a detailed example, step by step instructions on how to place a Back bet on a horse using the example code, please start from the beginning how to connect excel to market feeder8 and then how to place a back bet, I am sure once you give me detailed step by step instructions on how to place a back bet on a horse I will be able to use the market feeder 8 manual to work out how to place a lay bet, and how to cancel a bet using your vba examples Thank you.

  • Administrator
  • Posts: 8821
  • Gender: Female
*
Re: Linking to excel
« Reply #3 on: 13 Dec 2017, 11:51 »
1. Create a new Excel book.

2. Create a new sheet or rename the existing one to "vba" (or whatever you like, just make sure you keep it separately from other sheets and do not delete it accidentally).

3. Copy the VBA code from the "vba" sheet in the Excel book attached.

4. Edit the "routine" subroutine the way you like, i.e. add back and lay commands or cancel commands using the templates provided in the code of the routine. Remember that to place bets using the Excel interface, you need to know the IDs of the market and selections you will be betting on.

5. Open MF Pro, log in to it and connect it to Excel. Say yes when it asks you whether you want to connect to the existing instance of Excel. That is where you vba sheet is already open.

6. Run the routine either from inside the code or using any other means you had in mind when intending to use VBA for betting. Check that the bets are placed in the program.
Always try your triggers in Test Mode before switching to real money!

Follow us on Twitter.

Join our WhatsApp chat!

Присоединяйтесь к официальному Telegram-каналу!

 

Please note, BetFair is seems to be currently OFFLINE