Author Topic: Moving average of liquidity at best available prices  (Read 1492 times)

  • All members
  • Posts: 63
Hi All,

Apologies if this is a repeat question which I've not found the answer to.

I was wondering what the best way would be to calculate the moving average of the variables back_amount and lay_amount, or any variable for that matter.

I normally have my refresh rate set to 1 second and looking for a moving average over say the last 60 seconds.


  • All members
  • Posts: 63
Re: Moving average of liquidity at best available prices
« Reply #1 on: 19 Sep 2019, 16:12 »
I've not tried it, but think I might have a solution in mind for this.

I'm sure it's not the most efficient way, so please let me know if there's any better suggestions.

Create a trigger set to run every refresh and create several variables, maybe 60 in my case, and one additional variable for the average. 

Variable1 = Variable2
Variable2 = Variable3
Variable3 = Variable4
Variable4  = Variable5
So on... 
Variable60 = back_amount
Average_variable = (Variable1 + Variable2 +... + Variable60) / 60

Maybe I'm missing something but I'll give it a try. 


Please note, BetFair is seems to be currently OFFLINE