Author Topic: Calculating Total Money Available Across a Number of Prices  (Read 6460 times)

Tags:
  • All members
  • Posts: 5
  • Gender: Male
Hello,

This has been a little confusing to explain so I apologise if it doesn't make sense!

However, to try explain my request through an example...


I want to lay £100 at 4.5 but there is only £20 available at 4.5. However, there is £30 available at 4.6 and £50 available at 4.7. So if I lay £100 at 4.7, I believe Betfair will automatically take the money available at 4.5, 4.6 & 4.7. So this is similar to the 'best price' option in the settings but I am trying to set a variable that tells me that price (ie in this instance 4.7) which I can then set as my lay price but having no luck.

Is there a trigger that could fulfill the above example and return me the minimum price I require if I specify I require £100 to be matched?

Many thanks in advance

Barry

  • All members
  • Posts: 3597
Hi
perhaps something like this in the price field:
IF(lay_amount<100, IF(lay_amount+lay_amount2>100, lay_price2, lay_price3), lay_price)

with a condition:
selections lay volume is greater than 100
 
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 3597
ps
for the above condition to be correct, the setting "Retrieve all price offers" should be switched off

or you could use this condition instead:
selections trigger expression lay_amount+lay_amount2+lay_amount3 is greater than 100
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

  • All members
  • Posts: 5
  • Gender: Male
Hi Mark,

Thanks for the quick reply. 

A follow up question - if lay_amount+lay_amount2+lay_amount3 does not give £100, is there a way in which I could include a 4th price or even a 5th price, etc?

Regards

Barry

  • All members
  • Posts: 3597
Hi
yes, in the settings you need to switch on Download all price offers
and then use a combination of l_offered_{price} and r_ticks(price, ticks)
e.g.
amount waiting at three ticks higher after best lay price will be: l_offered_r_ticks(lay_price,3)
amount waiting at four ticks higher after best lay price will be: l_offered_r_ticks(lay_price,4)
etc.
some prices may have zero offers waiting so you will need to play around with how many prices you want to check for your needs
Please read the following disclaimer with regards to the information you may request and obtain on our forum. This specifically concerns trigger files and various instructions as to how to implement a strategy.

 

Please note, BetFair is seems to be currently OFFLINE