Author Topic: Recouping losses trigger and Previous Triggered Events Minutes before the Off  (Read 2466 times)

Tags:
  • All members
  • Posts: 80
Hi Guys, 

In the trigger for recouping losses in several steps https://marketfeeder.co.uk/learn/triggers/recoup-loss-4-steps/

There is a line in the laying trigger conditions that says "and Previous Triggered Events Minutes before the Off is less than -130"

My understanding is that this condition is don't execute the current trigger until at least 130 seconds after the previously bet race has started.

Can someone please confirm my assumption is correct, but most importantly, what the purpose of the rule is in the context of the laying trigger recouping losses.

Thanks guys,

Steve

  • All members
  • Posts: 80
Sorry, I mean 130 minutes not seconds.

  • Moderator
  • Posts: 3605
*
Hi
The condition block:

OR
previous triggered events status is not settled
and previous triggered events minutes before the off is less than -130

is used to stop the trigger getting stuck if Betfair do not settle the previous market, or the previous market is delayed for some reason.

The trigger relies on the result of the last market for the recovery. If the last market was not settled, the trigger will wait a reasonable amount of time to see if it does get settled (approx. 120 minutes + say 10mins event running time), if still not settled it moves on to the next event.
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: 80
Hi MarkV,

Thanks for that. Ive noticed a few times that the trigger stops betting. Is it ok if when I new manage to reproduce this that I post the trigger Log here?

I am fairly sure the bet_cntr variable isnt always being decreased when a race with a lay bet settles.

Steve 

  • Moderator
  • Posts: 3605
*
Hi
yes sure, I'll take a look.
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: 80
Hi MarkV,

Ive worked out what the problem is with this trigger that stops it placing bets.

Assume max_bets = 2

If a bet is placed in the market but is unmatched the variable bet_cntr is incremented by 1. If the bet stays unmatched in the market the bet is deleted once the market goes inplay but the bet_cntr variable is still equal to 1. When the race is settled, because there is no bet in the market the variable bet_cntr is not decremented by 1. So bet_cntr will still = 1 although there are no bets in any market.

If another bet is placed bet_cntr will now = 2 and if this bet also sits in as an unmatched bet this bet too will be deleted when the market goes in play. So bet_cntr now = 2 and when this event is settled there is once again no bet in the market so bet_cntr will not be decremented and will remain at 2.

No more bets will be placed because in the trigger called "laying" there is a condition that says "Selections trigger expression bet_cntr is less than max_bets". bet_cntr = 2 and max_bet = 2 so this condition will always be false and will never be reset.

Could you please have a look at this issue.

Thanks
Steve


  • Moderator
  • Posts: 3605
*
Hi
I tested this in Time Machine using your settings, unmatched lay bets (1.01) that were cancelled at in-play, and looking at bet_cntr in View Variables window. bet_cntr increments on the lay trigger firing, and it does decrement when the market status is settled, with or without matched bets.

Could you check in your settings that you are not deleting settled markets automatically?

Otherwise need to refer to the trigger log when the stop situation occurs again.
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: 80
Hi MarkV

I can confirm that I am not deleting settled markets automatically.

For the trigger "at the end of an event" doesn't the condition "Trigger laying Number of runs in the market is greater than 0" essentially mean the trigger should run when there is a matched bet in the market, and the matched bet was put in the market by the trigger called "laying"



Here is the trigger log for the trigger called "at the end of an event" for the second last race at Kempton. 
The bet_cntr variable was decreased by 1 and there was a matched bet in the market.

05:28:00   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Idle).
05:33:02   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:08   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:13   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:18   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:23   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:28   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:33   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:39   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:44   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:49   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:33:54   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:00   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:05   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:10   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:15   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:20   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:25   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:31   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:36   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:41   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:46   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:51   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:34:56   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:35:02   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:35:07   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:35:12   Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap: Inappropriate market status (Suspended).
05:35:17   Checking market "Horse Racing / GB / Kemp 10th Jun / 05:30 Kemp 10th Jun - 6f Hcap".
05:35:17   Checking condition and Trigger laying Number of runs in the market is greater than 0.
05:35:17   Condition is: TRUE. valid for 10 selections: May Remain, Private Matter, Inaam, Human Nature, Three Little Birds, Inexes, Pedestal, Nezar, Di Matteo, Imhotep.
05:35:17   Selection: May Remain, initial expr.: bet_cntr-1, intermediate: 3-1, final: 2.
05:35:17   Setting variable bet_cntr to 2.




The trigger log for the trigger "at the end of an event" is below. 
For this race the bet was never matched so was deleted when the event turned in-play

05:58:01   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (Idle).
06:03:04   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:11   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:14   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:21   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:27   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:33   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:39   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:46   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:52   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:03:58   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:04   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:10   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:16   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:23   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:29   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:35   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:41   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:48   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:04:54   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:05:00   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:05:06   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:05:12   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:05:18   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:05:25   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (In-Play).
06:05:31   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (Suspended).
06:05:35   Horse Racing / GB / Kemp 10th Jun / 06:00 Kemp 10th Jun - 1m4f Hcap: Inappropriate market status (Suspended).

There is nothing after that last two lines saying "Inappropriate market status (Suspended)."

  • Moderator
  • Posts: 3605
*
Hi
Trigger laying number of runs in the market is greater than 0 is checking if the laying trigger has executed in that market. The bets could be matched / unmatched / cancelled etc., or could even be setting a user variable. That condition just checks the laying trigger actually fired in that market.

From looking at your log extracts, the last race status did not change from suspended to settled. I had a look at the results for that race and no probs or delays. It looks like that market stopped being refreshed after approx. 4 secs of suspension.

In the previous race log, as soon as the market was settled (after just over 2 mins of suspension) the end of event trigger fired.

Basically the end of event trigger is a control mechanism to check the market has actually been settled before decrementing bet_cntr.

From what I can see, I think any issue you are having is related to late market settlement or non-settlement. Or, something is stopping the market's status being updated to settled.

Suggestions:

Are you testing in test mode? Please check test mode settings for bet settlement simulator are not conflicting with Betfair settlement.
settle markets with data loaded from betfair should be ticked
settle finished markets automatically should be un-ticked

In monitoring options, please check if there is an acceptable limit set of simultaneously refreshed markets
Also in monitoring, check stop monitoring is un-ticked

I think this trigger could be modified to update bet_cntr on matched lay bet data rather than trigger laying number of runs. If you wanted this done you could put in a trigger request.    
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: 80

  • All members
  • Posts: 80
Hi MarkV,

I think I know what is happening here. 

When you are running this in Test mode (not in Time Machine Mode) when a bet is placed, and then "My Markets" refreshes before the race is settled this is happening. I have stopped the refreshing of "My Markets" and I havent seen this happen again. 

Thanks for all your help in troubleshooting this.

Steve

 

Please note, BetFair is seems to be currently OFFLINE