Pages:
Actions
  • #1 by Orzola on 07 Apr 2013
  • As I continue to try to get to grips with MF7 I have some questions re activation and deactivation of triggers and blocks.

    I don't think that a trigger can deactivate itself.  I assume that is because all actions are performed simultaneously.  But can a trigger deactivate the block it sits in?

    Also, is there some delay when a trigger or block is activated?  Or should it be instantaneous?

    So if a block had two triggers in the order
    trigger A (enabled)
    trigger B (disabled)

    and the actions of trigger A were:

    1. bet for £x
    2. activate trigger B

    and the actions of trigger B were:

    1. bet for £y

    should both bets (x and y) fire on the next refresh (assuming no conditions or conditions all met), or is there some delay inherent in activating a trigger such that more than one x bet will fire before a y bet fires?

    Any insight gratefully received.
    O
  • #2 by MarkV on 07 Apr 2013
  • Hi
    I think you can deactivate a trigger with a second action (after the betting action).

    I'm not sure on the activation delay, but I would guess that it needs at least one refresh to prepare for activation. Best way is set up a test trigger to write something like current time to the action log on activate. Set your market refresh to say 5 or 10 secs. You should be able to see the results in the log.
  • #3 by Orzola on 07 Apr 2013
  • Thanks Mark

    I did some testing on a one second refresh which seemed to indicate some delay on activations, which I wasn't expecting and confused me.  So what you say on that makes sense.

    I'm pretty sure I also tested a deactivate action after a betting one and it didn't work - crashed the program if I remember correctly.  I thought the actions within a trigger were simultaneous rather than sequential and that's why that didn't work.

    I suppose I could just have a deactivate block/trigger with identical conditions following a bet block/trigger.  That should work shouldn't it?  Both blocks/triggers will be working off identical data on the same refresh won't they, even though the first is firing a bet?
  • #4 by MarkV on 07 Apr 2013
  • Hi
    If you are going to use deactivate it may be better as you say to have a separate trigger for the deactivation action.
    Conditions should include:
    Trigger A number of runs is greater than 0
    or appropriate conditions for checking Trigger A executed

    ...but on that theme why not just have a condition in Trigger B:
    Trigger A number of runs is greater than 0

    and in Trigger A you could also have:
    Trigger A number of runs is equal to 0

    no need for the activate /deactivate then?
  • #5 by Orzola on 07 Apr 2013
  • Haven't tried using Trigger's number of runs before, and your post has given me an idea which might well make everything much simpler for me - so thanks very much.

    Similar question about that though - how quickly will a run register.  Will there need to be a further refresh?

    E.g.

    Trigger C is set to bet £x no more than 10 times
    Trigger D is set to bet £y if Trigger C's number of runs > Trigger D's number of runs

    What will happen on the next refresh?  I assume, just a bet for x, then on the next refresh after that, a bet for x and y?
  • #6 by MarkV on 07 Apr 2013
  • Hi
    I can't say for sure, perhaps Oxa could confirm, but I think it works like this:
     
    If you have two triggers with no conditions they will both execute on the same refresh.

    If you introduce bet related conditions to any trigger, it will have to get the list of bets first. Then the next refresh after that the second trigger will fire. For example:
    selections back unmatched greater than 0
    requires an updated list of bets

    What I am alluding to is the refresh rate of the list of bets will be the biggest delay. You can change that in the settings and match the bets refresh to market refresh.
  • #7 by Orzola on 07 Apr 2013
  • Thanks for all your help Mark.  If Oxa can help further that would be a massive help.

    I've been looking into the possibilities of 'trigger number of runs' since you mentioned it.

    Is it possible to write a condition comparing the number of runs of two different triggers?  If so how?  I can see that I can choose Trigger from the drop down menu when writing conditions, but how can I add a further Trigger to compare it to?

    Thanks for all this help
    O
  • #8 by MarkV on 07 Apr 2013
  • Hi
    I'm not sure if this is what you want to do, but the attached shows it in very basic terms.

    Trigger C will only execute if:
    Trigger A number of runs is greater than 0
    AND
    Trigger B number of runs is greater than 0

    you can change any triggers Execute to specific number of times
    and you can change number of runs conditions as well
    so you can have many variations

    An example:

    Trigger A executes once only
    Trigger B executes 20 times when Trigger A number of runs is equal to 1
    Trigger C executes when trigger B number of runs is between 11 and 15
    etc.
  • #9 by Orzola on 07 Apr 2013
  • Thanks.  Can I have a condition such as

    Trigger B number of runs > Trigger C number of runs

    or

    Trigger B number of runs - Trigger C number of runs = 1
  • #10 by MarkV on 07 Apr 2013
  • Interesting question. I don't think you can do that as you describe it.

    You can do it using a user variable as a counter.
    In each trigger add a second action to increment a user variable as a counter.
    Value: uservar+1

    Then you can do the comparison conditions using the user variables
  • #11 by Orzola on 11 Apr 2013
  • Mark
    Thanks for all this.  Setting user variables is no problem.  As you say, just add an action.  But how can I compare them once they are set.  The only conditions dropdown I can find refers to global user variables, but if I am setting user variables by market, how do I access them to compare?
  • #12 by mcbee on 11 Apr 2013
  • hi Orzola
    you use
    and selections trigger expression (variable name) is greater than x

    etc
    or
    and selections trigger expression (variable name) is less than (variable name)
    etc

    mcbee
  • #13 by MarkV on 11 Apr 2013
  • Hi
    Following on from mcbee's post
    If for example you made user variables to count the number of times triggers B and C executed as follows:
    user variable name: B_counter
    user variable name: C_counter

    you can use them in conditions like this:
    selections trigger expression B_counter - C_counter is equal to 1

    selections trigger expression B_counter is greater than C_counter

    selections trigger expression B_counter is equal to 0
    and selections trigger expression C_counter is greater than 0

    etc..
     
  • #14 by Orzola on 11 Apr 2013
  • Thanks both.
    I had been wondering what trigger expression was for.
  • #15 by RodrigoM. on 29 May 2014
  • Hello,

    I tried to implement the solution adopted on this tópic but without sucess.

    The triggers keep firing at the same time...

    Have someone have any other idea?

    thank you
Pages:
Actions