Author Topic: Validating a price for a period of time query  (Read 1064 times)

Tags:
  • All members
  • Posts: 154
  • Gender: Male
Validating a price for a period of time query
« on: 17 Mar 2019, 18:38 »
Hi,

I'm after a bit of help please.

I seem to recall there is a way of ensuring a price point is met for a period of time but I'm struggling to find it.

I have a "Remember" trigger condition (favbets_market_id) that fires once a runner hits 2.0 or less.  Execute is set to once per market.
I have a refresh rate of 0.4s when in-play.
I want to see that runner's price consistently at 2.0 or less for say 2 seconds (i.e. 5 refreshes).

My thoughts are:

a) There's a way of doing this using one of the time based functions (e.g. b_growth)
b) Setting the trigger execute option to "no more than" x seconds
c) Have a second remember trigger (favbets2_market_id) that fires 2 seconds after the first remember trigger has fired and then compare the 2 to see if the same selection is the favourite (favbets_market_id_1_sel_id = favbets2_market_id_1_sel_id.)

For c) I'm not sure how to ensure the second trigger is 2 seconds after the first one fired.
For example, is the current time "remembered" as part of the favbets_market_id data set?
If it is, then I know how to solve this problem.  If not, I'm stumped (but wouldn't remembering the time a trigger fired be a good enhancement?)

Can anyone recommend a way of achieving this please?

regards

Wez

  • Élite
  • Posts: 3698
  • Gender: Male
*
Re: Validating a price for a period of time query
« Reply #1 on: 17 Mar 2019, 20:41 »
hi
and selections trigger expression maxbp_.032 is equal or less than 2

the .032 = 2 seconds so adjust this to whatever you want

mcbee
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.

  • Moderator
  • Posts: 3597
*
Re: Validating a price for a period of time query
« Reply #2 on: 18 Mar 2019, 07:39 »
Hi
mcbee gives a good solution there.

just for info if you wanted to record the time a trigger fired, add a second action to your betting trigger:
set user variable, name: fire_time value: now_time

then in subsequent triggers you can reference the time the betting trigger fired:
and selections trigger expression (now_time - fire_time)/mf_second is equal or greater than 2    
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: 154
  • Gender: Male
Re: Validating a price for a period of time query
« Reply #3 on: 18 Mar 2019, 20:30 »
Thank-you Gentlemen,

Two excellent solutions, either of which I could (and will) deploy.

Thanks for sharing your knowledge,

regards

Wez

 

Please note, BetFair is seems to be currently OFFLINE