Article

Get average LPT in the last minute

How would it be possible to get the average Last Price Traded in the last minute and use it as a trigger for "Place Bet"?

Comments ( 1 )


  • Betfair Bot
    23.5.2020 15:43:21

    If required feature is not yet implemented in pre-built bfexplorer bots you can create your own bot trigger.

    When opening some markets in bfexplorer for monitoring we can see charts in ladders or in the Bet Event grid view in Watched Selections and so on.

    What does it mean?

    It means that bfexplorer app must process some way this data for charts. And yes, software developer using Bfexplorer BOT SDK can find that Selection object offers following property: PriceTradedHistory, and there either TradedPrices or Prices.

    In the user interface of bfexplorer app a common user can browse this data by clicking on selection context menu: Show Selection Data

    Ok, we know where our data are so now we can program simple bot trigger code:

    AverageTradedPriceBotTrigger.fsx

    How the average traded price is calculated can be seen in the function: getAverageTradedPriceFromTime (lines from 48 to 63)

    And how this function is used to trigger an action bot is on lines from 82 to 91.

    What we must realize when developing this kind of strategies is the fact that bfexplorer must monitor market for required time, and that data are stored only for limited time, it is saved 60 last data points.

    There is also other alternative to get traded price. I showed that at the end of my short video.