Author Topic: Using Remember to avoid repeat bet - one extra bet still sneaking out  (Read 5734 times)

Tags:
  • All members
  • Posts: 31
Hi,

I am using the recommended Remember method to avoiding repeat/dupe bets (ie. I am cancelling and laying again at Back price if the previous unmatched bet has been sitting there unmatched for more than 15 secs).  Better than previous methods, however 1 in every 3or4 bets is still escaping as a Dupe bet. eg. I am making $25 lay bets and once the Total Matched for a selection reaches $50, it should not send anymore bets.

Could anyone advise as to whether I am using the Remember function in the wrong way? or are my refresh rates on each trigger not correct. My List of Bets is set at 0.5 refresh and Market Refresh is 2.4 secs.

Block 1 : Initial Bet $25 @ Back_Price, repeat Just Once, execute once per selection
Block 2 : Set User Variable as time_sec = 15, repeat Just Once, execute once per mkt
Block 3 (2 triggers) : repeat every 3 secs
Trigger 1- Remember (Name: Rem_cxllay)
- Create new list each time, disregard sel bets, executed no more often 3 secs
- Conditions : (i) Sel TrigExp time_sec < (now_time-bu_laytime)/0.0000157
                    (ii)  Sel Back_Price > bu_layp  OR  Back_price > bm_layp
                    (iii) Sel Lay Matched < 50 
                   (iv) Sel No of Unmatched Lay Bets = 1
                    (v) Market Status is Idle
Trigger 2 - Cxl&Lay $24 @ Back_Price, executed no more often than 6 secs
- Conditions : (i) Trigger [Block3Trigger#1] No of runs per seelection > 0
                    (ii) Sels Lay Matched <50
                    (iii) Market ststus is Idle)

Help is greatly appreciated as this has been a process of many long weeks to get me to this stage.

Thanks,
Trent

  • Moderator
  • Posts: 3597
*
Hi
You do not mention a Close Block trigger and conditions for Block 3. It requires one for the repetition to operate correctly.

To use a simple example, if I am doing repetitive laying and greening up, at the very least the close block conditions should include:
and selection's lay unmatched is equal to 0
and selection's back unmatched is equal to 0
...before the triggers can be repeated
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: 31
Hi Mark,

Thanks for the reply.

I have listed the conditions that relate to each Trigger within that Block 3. Is that what you mean ?

The Block repeats every 3 secs and the Remember list (the first Trigger)  starts afresh each time. That's my undertanding. Once the first bet is matched, it is placng the second $25 lay bet. My problem is that occassionally (25% of the time), it is sendng a 3rd $25 bet after the $50 Total matched has been achieved.

What is the difference between using Close Block and repeat Block every 3 secs ? I've been wondering about how Close Block works for some time.

Kind regards,
Trent

  • Moderator
  • Posts: 3597
*
Hi
You need a 3rd trigger in Block3. Action: close block
close block tells the program it is OK to start the repetition of that block of triggers again. Your conditions in close block should include every detail you can think of as to allowing the block to start over. A block which is executed ‘no more often than’ without a close block trigger will repeat uncontrolled, and I believe this is where your problem is.
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: 31
Hi Mark,

Firstly, thanks very much again. It makes my week to be able to get replies on this, my first trigger (& probably only trigger I am looking to set up for my system.

Good and bad news. That piece of advice has helped because without it I wouldn't have noticed that my time delay of 15 secs before cxl&Laying wasn't actually being adhered to without the Close Block instruction.

Unfortuntaely, it has not stopped the 3rd bet sneaking out. 3rd bet is pobably sneaking out even more often now. So I added the single condition to Close Block that "Trigger [Block3Trigger#2] No of runs per selection > 0" but problem remains(even after experimenting with Once per selection, once per market & once every 6 secs).

Would be very grateful again for further guidance to get around this problem.

So my Block 3 now looks like:

Block 3 (3 triggers) : repeat every 5 secs
Trigger 1- Remember (Name: Rem_cxllay)
- Create new list each time, disregard sel bets, executed no more often 5 secs
- Conditions : (i) Sel TrigExp time_sec < (now_time-bu_laytime)/0.0000157
                    (ii) Market Mins Before Off <=8
                    (iii)  Sel Back_Price > bu_layp  OR  Back_price > bm_layp
                    (iv) Sel Lay Matched < 50 
                   (v) Sel No of Unmatched Lay Bets = 1
                    (vi) Market Status is Idle
Trigger 2 - Cxl&Lay $24 @ Back_Price, executed no more often than 6 secs
- Conditions : (i) Trigger [Block3Trigger#1] No of runs per seelection > 0
                    (ii) Sels Lay Matched <50
                    (iii) Market ststus is Idle)
Trigger 3 - Close Block [Block3], executed every 6 secs
Conditions :  Trigger [Block3Trigger#2] No of runs per selection > 0

  • Moderator
  • Posts: 3597
*
Hi
I think things are getting too complicated.

I looked again at your original objective and wrote out the logic in english:
  • lay 25 at back price
  • if not matched in 15secs cancel and do again
  • to max 50 lay matched
and then translated that logic to a trigger

I have assumed the fav as selection, and have not taken into account partially matched bets, but it should do what you want.
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: 31
Hi Mark,

Thanks alot. Quite like the extra simplicity however I am still getting dupe bets sneaking out, even with it executing every 10 seconds. I suppose there's not much I can do if the pre-existing bet gets matched 1-2 seconds before the Tigger has completed checking conditions because the Update Bets List simply hasn't updated....is there ?   That's why people were suggesting using the Remember function. And the Remember function was probably not duping as often as what I have encountered with the single Cxl&Lay trigger.

Do you have any further thoughts on this ? Don't really know what else to do.

FYI, I added few of my important Conditions as follows so your trigger is:
Trigger Cxl & Lay $25 @ Back_Price executed every 10 secs (thought that was plenty delay  considering my Update Bets List is set at 0.5 secs and refresh is 2.4 secs.
Conditions :
(i) Sels Lay Unmathed => 0
(ii) Sel TrigExp time_sec < (now_time-bu_laytime)/0.0000157
(iii)  Sel Back_Price > bu_layp 
(iv) Sel Back_price <= 6
(v) Sel Lay Matched < 50 
               
Many thanks for you help. Hope there is some refining of that Remember trigger I wrote above perhaps because that is what seemed to do best. I've just run out of ideas.

  • Moderator
  • Posts: 3597
*
Hi
I think it’s a good idea to check the trigger log and find out why surplus bets go out.
Going back to the remember trigger, close block should only be executed once per market.
Although I have no experience of using ‘cancel then lay’, I have seen similar issues reported in the forum. I was wondering if you had tried separate ‘cancel lay’ and ‘lay’ triggers? The idea being you could apply a separate batch of conditions to each, which should give you more control.
Overall I believe this is a timing issue and the log should help to pinpoint where it is. Introducing a delay (search 'counter' on here) to the next repetition, or after a cancel or lay trigger might be another idea.

Update:
bu_laytime used in your trigger is betfair's server time, now_time is your PC time. If your PC time is different to betfair's server, the calculation is invalid. You can sync your PC time to betfair's in settings. It might be better if you counted 15 secs yourself before you cancel lay ('counter' above refers).
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
*
Hi
I’ve changed this around a bit and it seems to work OK.
My settings are:
update list of bets 3 secs nothing below ticked
market refresh 1 sec
You can add your own conditions once the basic mechanics are working properly. Try it and let me know how you get on. If it fails I'll look again at remember.
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
*
Hi
Here is a more efficiently written version of the above.
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: 31
I've been fiddling around with some of my older Remember trigers and was trying to get it down to an acceptable 5-8% of Selections dupe bet. Had no intention to return to the forum except for thanking you for your 3rd last post. Very happy and exited to be able to try out your last two trigger ideas tomorrow on Oz races (need to sleep right now and Im not hooked up to my PC internet).

Thank you so much once again for contributing to this. If we get to a solution, I'll definitely recap for everyone that wants to benefit from this thread.

Cheers,
Trent

  • All members
  • Posts: 31
Hello,

Using conditions in the Close Block trigger worked beautifully. No more extra bets sneaking out. Brilliant idea of gaining control of that problem. Even better than using Remember!

When I tried to create multiple Close Block triggers to cater for different time delays (ie. one Close Block for when 8 - 4 mins to Off and Unmatched for 30 secs, one Close block for3.95 - 1.5 mins to Off and Unmatched for 15 secs etc.) this didn't work and have had some problems created the same conditions structure within Conditions for the single Close Block trigger. I always need to also remember to cater for the scenario that the Selection will either be (i) Unmatched & <$50 Matched  or (ii) Matched & Zero Unmatched & Less than $50 Matched.

My idea is to structure it like this within Conditions for the Close Block but it told me I didn't have correct AND/OR parameters parameters. Is this too much...?
OR : Conditions Block 1 : Lay Matched <50, Lay Matched >0 & Lay Unmatched = 0
OR : Conditions Block 2 :
      AND : Lay Matched <50, Lay Unmathed >0, Back_Price > bu_layp
      AND Sub Block 2 :
            OR  Mkt Mins Before Off 8 to 4 , Trig Exp..etc. =>time_sec
            OR  Mkt Mins Before Off 3.95 to 1.5, Trig Exp...etc. =>time_sec2  
            OR  Mkt Mins Before Off <1.95, Trig Exp...etc. =>time_sec3      

Cheers,
Trent

  • Moderator
  • Posts: 3597
*
Hi
I’ve done the first two condition blocks. I’ll leave the third to you. The conditions could probably do with some optimisation at a later stage, but at least this way you can see the logic. Depending on how you choose your selections, you should give consideration to what happens if they change. For example: in testing the first 25 lay was made on the favourite. The favourite changed and the trigger made another first 25 lay on the new favourite and went on to function only on the new favourite. Some appropriate conditions using sel_id or sel_name should sort that.   
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.

 

Please note, BetFair is seems to be currently OFFLINE