Author Topic: Disable one of the triggers on Sunday  (Read 910 times)

Tags:
  • All members
  • Posts: 314
Disable one of the triggers on Sunday
« on: 18 Aug 2019, 10:18 »
Hi,

I have a number of separate strategies, each having their own trigger block. Some of these block do not have selections available on Sunday, but the others do.

I am trying to conserve as much resource as possible, and my thinking is that even though there will be no selections, the triggers for those selections will still 'check', so, I am looking to try to deactivate, or disable these triggers, on a Sunday.


From the initial setup image attached, Can I assume if I deactivate a trigger BLOCK, everything inside it will be disabled, even though enabled is checked? I will have it run one time only.

I added an excel formula to the View User Variables, as WEEKDAY(event_start_datestr). In excel, for today (Sunday), this will return 1, as Sunday is deemed to be the first day of the week. The return back from VUV gives WEEKDAY(18/08/2019) - is there an alternative I can use, to give me just a number, and without the formula used, in the return value. The trigger I am looking to try will not give me the number 1, it will return as above, and the trigger will not deactivate the trigger block, because it is expecting a 1, so it evaluates to false.

Can I do this some other way?

Thanks

  • Moderator
  • Posts: 3597
*
Re: Disable one of the triggers on Sunday
« Reply #1 on: 19 Aug 2019, 06:11 »
Hi
WEEKDAY() is not a supported function, but Current Time will do the same.

in your betting trigger put this condition as the first condition. It will not check any other conditions if FALSE and will use minimal resource:
global current time is not equal to Sun

you can use variations of this:
global current time is between Mon and Sat
OR
global current time is greater than Sun
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: 314
Re: Disable one of the triggers on Sunday
« Reply #2 on: 19 Aug 2019, 11:28 »
Hi MarkV,

Thanks for the help, Disable block where Global Current Time is equal to Sun - thanks!

I have a set of blocks, each having a number of triggers within. All the triggers have enabled checked, and if I deactivate the trigger BLOCK, will that stop the contained trigger within the block, running?

Logically, this looks correct, but just need to check?

Thanks

  • Moderator
  • Posts: 3597
*
Re: Disable one of the triggers on Sunday
« Reply #3 on: 19 Aug 2019, 16:25 »
if I deactivate the trigger BLOCK, will that stop the contained trigger within the block, running? Logically, this looks correct, but just need to check? Thanks
Hi, yes all triggers contained in a trigger block to be deactivated will not execute.
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