Author Topic: Help needed for Trigger looking to avoid in-play spikes  (Read 4115 times)

Tags:
  • All members
  • Posts: 7
  • Karma: +0/-0
Help needed for Trigger looking to avoid in-play spikes
« on: Fri, 18 May, 2012, 07:31 »
Hi there,
I'm trying to create a trigger that only places a back bet if the last traded prices and back prices have been below a certain level for two+ refreshes.  This is to avoid backing horses just because they very briefly trade at below my trigger point.

I have tried requiring that the selection is remembered for passing my trigger price before the bet is placed, but the remember trigger is taking effect before my back trigger and therefore I am still backing a horse when it passes my trigger price for the very first time. The remember trigger is below the back trigger in the trigger block.

Is there a way that I can only execute the back trigger if the remember trigger took place 1+ refreshes/1sec ago?

Or if there is another solution, is there a way that I can set a trigger to only execute if the back price has remained under a certain price for a certain time/number of refreshes?

Any help is really appreciated.

  • All members
  • Posts: 3337
  • Karma: +272/-0
Re: Help needed for Trigger looking to avoid in-play spikes
« Reply #1 on: Fri, 18 May, 2012, 10:17 »
Hi
Try adding a condition
and b_leap is less than 1

also could be worth looking at these variables: b_growth, pdif_[minutes], tdif_[minutes]
for example: tdif_0.017 is less than 1
(adjust 0.017 to your required timeframe)
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: 7
  • Karma: +0/-0
Re: Help needed for Trigger looking to avoid in-play spikes
« Reply #2 on: Fri, 18 May, 2012, 10:33 »
Thanks Mark, but looking at changes in price doesn't help here.  A price could be below my trigger point because of a big leap or not, but a big leap could still be a valid sign that a horse really has reached a point in the race where it's worth that price.  e.g. a leap could go from 4 to 2, which I would be interested in, if it remained under 3 following the next refresh.  Or it could go from 3.00 to 2.95, and I would still be interested as long as the price stayed at below 3.

I want to avoid the horses that leap back straight after hitting my trigger, not just avoid horses that hit the trigger following a big decrease in the odds.

I think that "remembering" when a horse has reached my trigger and then referring to that remember trigger is probably best, but I can't work out how to each attach a time to that action to compare to the current time, or to otherwise prevent my back trigger from taking place at the same time as the remember action (I can't only activate the back trigger once a selection is remembered because I back ANY horse that reaches that point during a race.

Thanks

  • All members
  • Posts: 3337
  • Karma: +272/-0
Re: Help needed for Trigger looking to avoid in-play spikes
« Reply #3 on: Fri, 18 May, 2012, 14:36 »
Hi
There is some info on setting a delay in this post:
http://community.welldonesoft.com/triggered-betting-10/trigger-delay-help/

another idea might be to set a user variable as a counter which increments every refresh, after the remember trigger has executed.
The back bet condition would be: counter >= [number of refreshes you want to delay for]
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: 7
  • Karma: +0/-0
Re: Help needed for Trigger looking to avoid in-play spikes
« Reply #4 on: Sat, 19 May, 2012, 07:57 »
Thanks Mark, setting up a counter seems to have done the trick :)  
A bit more testing required.  I've not come across a counter trigger before - would be a good one for the website/manual in my opinion.

For those that are interested, here's some more detail in setting it up (there may be more efficient ways - in which case, feel free to post a reply):

1) Set a "Remember" action for when your trigger is initially activated e.g. Remember any selection where back price <= x (take care over setting the execute and create new list parameters depending on what's most efficient for your strategy - I am not creating a new list each time, and executing only once per selection).
2) Set User variable "Counter" to zero using the condition of when any selection is affected by the remember trigger
3) Set User variable "Counter" to become Counter+1 every refresh by setting the execute parameter to a specific number of times (making sure that you set the number high enough to not run out in your market). You could equally set it to execute not more than, for example, every 1 second, if you want to measure a certain time.Only apply to the favourite so that it increments by 1.
4) Set your back/lay trigger  so that it checks your original trigger condition (e.g. back price <= x) and that Counter>=y, where y is the number of refreshes/seconds that you want to wait before checking the trigger is still valid.

N.b. this works only if the trigger is likely to happen less frequently than your delay - otherwise you'll keep resetting the counter to zero before hitting your delay. I guess you could set up a counter that is selection specific.

Now to see whether the delay hammers my winning odds...