Author Topic: Help with building my first trigger  (Read 1009 times)

Tags:
  • All members
  • Posts: 9
  • Gender: Male
Help with building my first trigger
« on: 20 Feb 2020, 10:46 »
Hi there. I want to build a trigger that places a lay bet on an in play horse racing win market. The lay price has a condition that is decided on a formula that involves the win market BSP, the place market BSP and the market commission. If the last traded price is less than the outcome of the formula then place a lay bet at the best back price minus 1 tick at a pre-determined liability (eg $10). Other conditions for the lay bet are market volume pre-off is over $200,000 AUD  (or 100,000 pounds, I'm from Australia), minimum win BSP is a set constant and maximum win BSP is a set constant.

I'm not asking for anyone to build this for me, I would like to do it myself. I have previously used Bet Angel and have built a number of automation so I'm not a completely newbie but I am a bit stuck and would really appreciate a nudge in the right direction.

  • Moderator
  • Posts: 3606
*
Re: Help with building my first trigger
« Reply #1 on: 20 Feb 2020, 19:53 »
Hi
OK, here are some pointers:

lay to a fixed liability: liability/(lay_price-1) your example: 10.00/(lay_price-1)

price, best back price minus 1 tick: r_ticks(back_price, -1)

for your win / place cross-market formula search the helpfile for winplace_ prefix. you can construct expressions in one market based on values in the other market

volume condition: markets matched volume is greater than 200000

great to see you wanting to learn  
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: 9
  • Gender: Male
Re: Help with building my first trigger
« Reply #2 on: 21 Feb 2020, 02:38 »
Thanks MarkV, your reply has helped me out a lot. I have one more question: is the variable "commission" a whole number or a decimal,  IE if the commission is 5% does it hold the value 5 or 0.05?

  • Moderator
  • Posts: 3606
*
Re: Help with building my first trigger
« Reply #3 on: 21 Feb 2020, 06:23 »
Hi
It's decimal and the value will be the commission rate according to your Betfair account.

Tip: use the View Variables Window to see the value of any variables or formulas live.  
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: 2
Re: Help with building my first trigger
« Reply #4 on: 21 Feb 2020, 09:49 »
Thank you once again, I appreciate your help.

 

Please note, BetFair is seems to be currently OFFLINE