Author Topic: Counter Trigger  (Read 3928 times)

Tags:
  • All members
  • Posts: 49
Counter Trigger
« on: 08 Aug 2012, 18:05 »
Hi All

Please could someone assist me with creating a counter trigger that would reset to 0 when a remember trigger has been executed


this is what ive attempted so far (i'm struggling with the counting in 1st instance)

name : Counter

markets: All Markets

execute : once a second

Selections: Favourite

Value: ive tried +1  ,(blank) ,=1 , =+1 ,Counter+1 and a number of equally ridiculous combinations.

conditions: none (not too sure how to create "reset to 0 if remember trigger has been executed"

I've also tried working through ClaretandMarlow's post to no avail

any assistance would be appreciated


thanks



  • Moderator
  • Posts: 3597
*
Re: Counter Trigger
« Reply #1 on: 08 Aug 2012, 18:48 »
Hi
I don’t know what you are counting, but this trigger counts 40 market refreshes after the score has changed and then fires the greenup. You can adapt it to what you want. Give me a shout if need any more help.
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: 49
Re: Counter Trigger
« Reply #2 on: 08 Aug 2012, 18:56 »
thanks Mark

forgot to mention the most important bit - it was market refreshes that i wanted to count.

thanks again

i'll take a look at the attachment

  • All members
  • Posts: 49
Re: Counter Trigger
« Reply #3 on: 08 Aug 2012, 20:10 »
Hi Mark

Would you mind casting an eye over my trigger if i could send it to you ?

its 90% complete and i'm just missing one more element - a further check, which i was hoping that a counter/remember combo would be the answer, but i'm still struggling to make sense of that aspect, even after taking a look at what you sent earlier.

thanks


  • Moderator
  • Posts: 3597
*
Re: Counter Trigger
« Reply #4 on: 08 Aug 2012, 21:52 »
Hi redarme
I prefer to assist on here rather than email. Perhaps you could just write out your trigger logic in english as to what you want the counter to do, or strip out any secret bits and post your trigger file.
So far I have:
  • that you want to count market refreshes (what is the condition to start the count; is it bet matched, price changed, another trigger fired?)
  • now that you have a counter counting market refreshes, where are you going to use the count? Is it for a delay?
  • the counter should reset to 0 when a remember trigger executes
    (this is straightforward: set user variable: ‘counter’, value: 0, condition: trigger ‘remember’ number of runs is greater than 0)

In the file I posted, the logic is simple. To count 40 refreshes after a goal is scored to let the market settle down, and then greenup. If you could let me know similarly what you want to do, I might be able to help a bit more.
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: 49
Re: Counter Trigger
« Reply #5 on: 09 Aug 2012, 07:49 »
Hi Mark,

i'll try to make this as clear as poss

The idea is to lay horses in play whose last traded price is 30% higher than lt_ma.

lt_ma is monitored individually at intervals for indexes 1-3 and when the 30% level is hit, the lay bet executes.

What i am seeking to avoid is a spike  - where the last traded price, for a split second goes above 30%, before diving again.

I want to make sure that the last traded price stays above 30% for 2 (maybe 3) refreshes to ensure a higher chance of the drift being genuine.

What i need a hand with is a remember trigger that executes when a last traded price is above this level - a counter trigger that starts counting at this point, and finally a condition in  the lay trigger that fires the bet once the counter is greater than 2, which i think is the simplest part and would be along the lines of "set user variable 'Counter' is greater than 2"

The counter would reset to 0 if the last traded price did go down below 30% and also when the lay bet executed.

ive attached a trigger and would appreciate any help you could give on this...

thanks

 

  • Moderator
  • Posts: 3597
*
Re: Counter Trigger
« Reply #6 on: 09 Aug 2012, 17:14 »
Hi redarme
Unfortunately I cannot spend as much time as I would like on this as I have other commitments, but the attached (untested) should show you the principle of a counter and the method for resetting it, and also the counter condition for your lay trigger. I am still unsure of the purpose of your proposed remember trigger. Is it to remember the selections that fit your > 30%, because you seem to have done it all in the lay trigger? Anyway, I’m sure you can sort that bit out.

A couple of observations:
It is better to initialise user variables – can be done using a trigger or a constant
I think you may find the overall trigger will operate too sluggishly for inplay. I mention this because of the number of ‘no more often than’ in the file. And, if I am seeing where you are going with this, you might be adding some more soon. ‘no more often than’ in V6 used lots of CPU, and my experience has been that any more than 2-3 in a trigger file will slow the program down a lot. My suggestion would be to see if you can use existing variables for your purpose. I know you are working on LTP, but perhaps you might be able to use lpdif_ and l_growth.
I hope this is of help 
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: 49
Re: Counter Trigger
« Reply #7 on: 09 Aug 2012, 18:10 »
Hi Mark

A remember trigger was an idea to create a delay so the trigger didnt fire the 1st time the price went above 30% - i wanted the lay bet to fire once the selection has been above 30% for two refreshes.

Like i said in my previous post any help would be appreciated, so thanks again for spending time looking at the example. I'll work on what you've suggested.

 

Please note, BetFair is seems to be currently OFFLINE