Author Topic: Execution of Trigger  (Read 46210 times)

Tags:
  • Élite
  • Posts: 167
*
Execution of Trigger
« on: 28 Feb 2024, 00:21 »
Hi, I don't understand how often the triggers are executed, depending on the refresh rate of the market and the list of bets.

When I set in the market and update list of bets to update every 30 seconds, the trigger only runs every 90 seconds.

If I set 15 seconds, the trigger will run every 45 seconds.

It looks like the trigger only runs on every third market update.

Is this intentional or am I doing something wrong?

Repeat every 1 second is set in the trigger block.

I am happy about every hint.

  • Élite
  • Posts: 167
*
Additional data Execution of Trigger
« Reply #1 on: 28 Feb 2024, 06:08 »
You find 

  • Trigger file (which only creates a random number on each execution and writes message to program log).
  • Program log

attached.

All Refresh rates (Market, List of Bets and Balance are set to 30 seconds.
Refresh bets individually for each market ist NOT checked.

Trigger is executed only once in 90 seconds. (as shown in program log. 

  • Moderator
  • Posts: 3631
*
Re: Execution of Trigger
« Reply #2 on: 28 Feb 2024, 15:17 »
Hi Martin
I think this is to do with the Close Block trigger. The close block trigger will wait for an updated list of bets before triggering and closing the block. In your example trigger if you set the block repetition to just once, disable the close block trigger, and the set tr_set_vars trigger to repeat no more often than 30 secs it will trigger at the correct interval.  
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.

  • Élite
  • Posts: 167
*
Re: Execution of Trigger
« Reply #3 on: 28 Feb 2024, 23:56 »
Hello Mark, 

thank you very much for your explanations. I did further experiments and found this:

If I repeat a block, complete it with close block and configure the triggers within the block with "once per market", the trigger is executed less often, but when the trigger is executed the bets, regardless of whether they are open or closed, are current.

If I only execute a block once and leave out the "close block", but configure the triggers within the block with "execute no more often than xxx seconds", it is not certain that the list of bets the trigger sees, is current. What certain is: the trigger is always executed after an refresh of the market. Even if I set the trigger to 1 second, it doesn't execute more often than the refresh rate of the market.

Depending on the strategy, I have to decide whether to execute the trigger quickly or only execute it when the market and bets are both current.

Thanks again and happy betting!
Martin


There is no shame in not knowing anything, but there is shame in not wanting to learn anything. Plato 427–348 8)

  • Moderator
  • Posts: 3631
*
Re: Execution of Trigger
« Reply #4 on: 29 Feb 2024, 09:50 »
Ok.
In case you haven't seen it there is a good article on repeating triggers here. 
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