Author Topic: Average price trigger  (Read 2003 times)

  • All members
  • Posts: 57
Average price trigger
« on: 16 May 2019, 07:19 »
Hi Team
I have just subscribed again.
I am looking to have a trigger developed please, that tracks the average price of the favourite over x seconds (+ or -) and all other selections over the same time period, In-Play after x % of the race is completed-then place a bet and green up for x ticks. i.e. I want to track the favourite in relation to all other selections over x seconds and to know if the average move is + or - .The number of selections and book % limit can/should be definable as well. A trailing stop loss of x% should be applicable

e.g. On a 10 horse or less race, the fav has moved in an average of 5 ticks or more over the 30 secs period and all other selections have moved out x ticks or more over the same time period after 40% of the race has completed and the back book % is less than 105%-back the fav for 10 tick green up and 5 tick trailing stop (which only acts if the book % is less than 105% in this example). If the move of the fav is out (-) and all others are in (+) then lay the fav for 10 ticks profit/ green up/SL when both bets are matched.
A better option would be to track/act on the the 5 tick move as per above at any time after 40% of the race is completed but not sure if this is possible
Thanks very much

  • All members
  • Posts: 57
Re: Average price trigger
« Reply #1 on: 16 May 2019, 07:31 »
Hi Team I have just subscribed again. I am looking to have a trigger developed please, that tracks the average price of the favourite over x seconds (+ or -) and all other selections over the same time period, In-Play after x % of the race is completed-then place a bet and green up for x ticks. i.e. I want to track the favourite in relation to all other selections over x seconds and to know if the average move is + or - .The number of selections and book % limit can/should be definable as well. A trailing stop loss of x% should be applicable e.g. On a 10 horse or less race, the fav has moved in an average of 5 ticks or more over the 30 secs period and all other selections have moved out x ticks or more over the same time period after 40% of the race has completed and the back book % is less than 105%-back the fav for 10 tick green up and 5 tick trailing stop (which only acts if the book % is less than 105% in this example). If the move of the fav is out (-) and all others are in (+) then lay the fav for 10 ticks profit/ green up/SL when both bets are matched. A better option would be to track/act on the the 5 tick move as per above at any time after 40% of the race is completed but not sure if this is possible Thanks very much

Apologies..one addition
If the trailing stop is unmatched for x seconds best price should be retried until it (stop loss bet) is matched
Thanks again

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Average price trigger
« Reply #2 on: 18 May 2019, 09:21 »
hi
here is your trigger , in the constants you can set.
Bet amount
Minimum price to bet
Minimum number of selections
Maximum number of selections
Maximum back book percent for the bet to be placed
Minutes to check the average back price
Minimum favorites tick difference over 30 seconds   back
Minimum tick difference for all other selections  back
The number of seconds left till the end of the race
Minimum favorites tick difference over 30 seconds  lay
Minimum tick difference for all other selections  lay
Maximum back book percent for the green and trailing stop loss
Green up option   y=yes   n=no
Green up ticks
Trailing stop loss option   y=yes   n=no
Trailing stop loss ticks


please use test mode until you are happy with your settings

mcbee

download the trigger below

If you need to have your triggers adjusted or add a new option / function to them after you have been supplied with a trigger file, please start a new topic.
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: 57
Re: Average price trigger
« Reply #3 on: 18 May 2019, 09:39 »
Thank you mcbee..will give it a whirl

Much appreciated

  • All members
  • Posts: 57
Re: Average price trigger
« Reply #4 on: 20 May 2019, 06:28 »
Hi mcbee
Thanks again for this. Interesting to watch.(I had to make some small changes re Sl and greening but other than that seems to work fine)
IS there a simple way to track all other selections average price in the user variables? i.e.: For the fav one can use (r_1_maxbp_ave_tm+r_1_minbp_ave_tm)/2..is there a similar formula for all other selections or would you have to have something like r2+r3+r4..etc (which would appear too long for the variables window)?
Apologies if a dumb question but I couldn't see the all other selections calculation in the logs (I turned logging on)
Cheers

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Average price trigger
« Reply #5 on: 20 May 2019, 06:56 »
hi
yes , the only way is to use each fav then divide it by the amount of favorite's 
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.

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Average price trigger
« Reply #6 on: 20 May 2019, 08:38 »
hi
on further testing and checking the logs I found a flaw in the all selections average price , the average of all selections will always be greater than x as 3.00 to 500.00 = 251.5.
I have remade the trigger to use separate values for number of selections from 2 to 10+
this will make it a bit easier for you to check/follow the ave prices + your set amount.
in the variable screen type or copy and paste.
r_ticks((maxbp_ave_tm+minbp_ave_tm)/2,r1_tdb)
r_ticks((r_2_maxbp_ave_tm+r_2_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_3_maxbp_ave_tm+r_3_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_4_maxbp_ave_tm+r_4_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_5_maxbp_ave_tm+r_5_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_6_maxbp_ave_tm+r_6_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_7_maxbp_ave_tm+r_7_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_8_maxbp_ave_tm+r_8_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_9_maxbp_ave_tm+r_9_minbp_ave_tm)/2,ao_tdb)
r_ticks((r_10_maxbp_ave_tm+r_10_minbp_ave_tm)/2,ao_tdb)

there is no point in going above 10 as the 10 is for 10 or more so it will work in all races , greater than 10 at x seconds before the finish the higher ones are mainly 500.00 to 1000

please use test mode until you are happy with your settings

mcbee

download the trigger below

If you need to have your triggers adjusted or add a new option / function to them after you have been supplied with a trigger file, please start a new topic.

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: 57
Re: Average price trigger
« Reply #7 on: 20 May 2019, 09:55 »
Thanks mcbee.I'll give that a try

  • All members
  • Posts: 57
Re: Average price trigger
« Reply #8 on: 21 May 2019, 07:24 »
Hi mcbee

Seems to run ok except that:
1. I get all lay opening bets and no back trades (greening up etc seems ok)-I have scanned the trigger +logs  and can't see the reason-in case you can see something obvious..frying my brain :)
2. Question re an example to see if I understand correctly: Lay trigger will act (where there are 9 runners), where the fav's back price is >(average price + x ticks) and all other 9 runners are x ticks or more below their average price, over the y time.In other words if there is one non fav where the back price is higher than the current average price the trigger won't act?


Cheers

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Average price trigger
« Reply #9 on: 21 May 2019, 07:38 »
hi
I had all back bets .
what are your tick difference settings for the back and lay bets , fav and all other sel.
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: 57
Re: Average price trigger
« Reply #10 on: 21 May 2019, 07:41 »
I had 10 ticks for the others and 5 for the fav..(to test)..if that applies to each and every runner(as per Question 2) then that explains why?

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Average price trigger
« Reply #11 on: 21 May 2019, 07:48 »
hi
I found that when testing your 5 , 5 was too high so I reduced it to 1 and bets were fired in more markets.
remember that for the back bets the fav should be -(your amount)   and the others (your amount).
for the lay bets it is reverse , fav (your amount)  and others -(your amount)
so backing , the fav has to be less than ave and others more than ave
for laying , the fav has to be more than ave and others less than ave
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: 57
Re: Average price trigger
« Reply #12 on: 21 May 2019, 09:38 »
Thanks mcbee-that clarified a few things in my head.

 

Please note, BetFair is seems to be currently OFFLINE