Author Topic: Betting in Over/Under markets  (Read 3497 times)

Tags:
  • Administrator
  • Posts: 8826
  • Gender: Female
*
Betting in Over/Under markets
« on: 26 Apr 2013, 12:28 »
Taken from a support ticket:
Quote
I need some help with a trigger for the following criteria in two over/under goal markets on the same in play football match

- if price in market A is "x" then place a lay bet in market B at "y"
- if lay bet in market B is matched then place back bet on market A at price "x"
- if market A is suspended/completed then green up or spread loss equally on market B

As it is usual with two or more markets of the same event (i.e. "Over/Under 1.5" and "Over/Under 2.5" of the same football match), we will be using the "remember" action extensively. It will help register certain events in a market, such as a selection reaching a certain price or market finishing. And it is the only way to connect those markets through using the variable market_parent_id in the name of the remembered selections. Since that variable will have the same value for both of the market, they will be able to share the data we need to build the right triggers.

See the attached file. The order in which the triggers are supposed to work is this:

1. remember if price reached in A. Creates a set of selections under the name of "A_market_parent_id" if the chosen selection in market A has reached the needed price.
2. lay in B. Lays if the variable "A_market_parent_id" exists, i.e. if the first trigger fired.
3. remember if bet matched in B. Creates a set of selections under the name of "matchedB_market_parent_id" if the bet placed by the previous trigger got matched.
4. back in A. Backs on the chosen selection in market A if the previous trigger has created the variable.
5. remember when A is finished. Remembers when market A is finished and settled. Don't forget to turn off the automatic deletion of finished and settled markets!
6. green up or distribute loss in B after A is finished. Greens up or distributes the loss on the chosen selection in B if A is settled.

You will find all the necessary constants in the file, adjust their values according to the particular strategy.
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