Feeding all markets' prices to Excel


So basically this trigger example does exactly what it says on the tin: it records all the prices from all your markets into an Excel sheet in two neat columns -- one with a horse name and the other with its back price. You can then use these columns for various analytic purposes. You will have the day's prices in front of you, and you will be able to set the frequency at which these prices are updated in the sheet.


Click here to download the trigger file.

In the constants you can set:

price_refresh : Refresh rate (in seconds) for price update. The lesser the value, the more frequently the prices will be updated in the sheet. Try to keep this above 2 sec;

record_inplay : Record In-Play prices: 0 - no, 1 - yes. If this constant is set to 0, the triigers will not record any new prices into the sheet after the market turns In-Play.

In Action

You will have to do some minimum preparation before you can run these triggers.

1. First, open Excel and create a new book. In that book create a new sheet (or rename the "Sheet1" sheet) with a name "horse_sheet".

Create a new Excel sheet

2. Go to Settings -> Excel Options and untick all the boxes in the following way.

Excel Settings

Please note that it is not compulsory to turn them off: this is just the way to save your computer resources. If you have a hundred markets, you might not really want to create a separate sheet for each and refresh them in Excel apart from refreshing the two columns you really need.

3. Open MarketFeeder Pro and load all the markets you want to monitor during the day. You can do this either manually or using Market Locator.

4. With your Excel workbook open, click on the Launch Excel link in the top-right corner of the program's interface.

Launch Excel

The program will ask you if you want to connect to the existing instance of Excel. Make sure you press "Yes".

5. Load the trigger file and turn the triggers on (the bulb next to the word "Triggers" in the same menu as "Launch Excel").

If you have done everything correctly, upon the refresh of the first market, you will see a list of runners looking similar to this one:

List of selections and their prices

Note that the title "Horse Name" does not bind the triggers to working with horses only: you can change this to "Selection Name" in the trigger called "initialising the sheet".

As more markets start refreshing during the day, you will see the columns populate:

More selections

Note how the upper selections' prices have changed to 1000 and 1.1 over time: this means that those prices are the last ones that the triggers recorded before the market finished. You can change this behaviour by setting the record_inplay constant to 0.

Please note you will need to manually clear the contents of the horse_sheet sheet when you want to restart the triggers, otherwise the program will add the selections of each new market underneath the already recorded ones.

If you have not heard of BetFair yet or do not have an account, register today and get £20 free. Use the link below:
New customers only, bet up to €/£20 on the Exchange and if your first bet loses, we’ll refund you €/£20 in Cash. Bet must be placed in first 7 days of account opening. T&Cs apply.
Gamble responsibly! Always be aware that betting is NOT risk-free. You must be 18+ years old before you try gambling, but even as an adult, withhold from spending money in an ill-judged manner. Our company does not encourage you to prefer gambling over other meaningful activities. If gambling is affecting your life or the lives of people close to you, please contact GamCare
© 2005-2023 WellDone Creative Software. All rights reserved. Terms and conditions.
BetFair® and the BetFair Logo are registered trade marks of Flutter Entertainment plc. Gamble responsibly.