Green up Selection triggering multiple times
- ringo.simpkins
- Posts: 28
- Joined: Thu Oct 17, 2019 6:49 am
I think this is a simple misunderstanding of mine, I have rule/variable which says if a goal is scored, then green up the selection if in profit. I have the variable checking (triggering) from 00:00 inplay time to 1:40:00, I set it to trigger 200 times, at 30 second intervals. The issue is, it works quite well, but keeps firing in bets until i remove the automation rule on the market in guardian manually. My question is, if I set it to trigger 2 times, would Guardian monitor the market checking for the in profit condition and trigger the rule or do i have to have it triggering 200 times, if so how do I stop it firing in bets once the profit is made? Should I be using Close Trade on Selection with Greening? I only ask as I have run out of matches today now, to try it out. Any advice would be welcome.
Technically speaking, you should only need it to fire once.
As long as the rule is monitoring the whole time and fires when it meets your conditions and the out bet is matched - that's it its done its job with one shot.
Practically speaking however because of in-play delays the money available could disappear or be taken by someone else before your out bet arrives or the money available is just not be enough to match your outbet entirely. For this reason its usually wise to set your rule to give the first bet a chance to be created (football 5-8 seconds typically) and sent to the market before you fire again to cover the possibility that the first wasn't matched - its not unreasonable to have extra fireings after this - but 200 seems like overkill.
Be sure to allow for the time delay - otherwise each time you fire you might well be cancelling the previous bet before it has had the chance to get you greened - or even worse - your new bet arrives just after the previous one got matched.
As long as the rule is monitoring the whole time and fires when it meets your conditions and the out bet is matched - that's it its done its job with one shot.
Practically speaking however because of in-play delays the money available could disappear or be taken by someone else before your out bet arrives or the money available is just not be enough to match your outbet entirely. For this reason its usually wise to set your rule to give the first bet a chance to be created (football 5-8 seconds typically) and sent to the market before you fire again to cover the possibility that the first wasn't matched - its not unreasonable to have extra fireings after this - but 200 seems like overkill.
Be sure to allow for the time delay - otherwise each time you fire you might well be cancelling the previous bet before it has had the chance to get you greened - or even worse - your new bet arrives just after the previous one got matched.
- ShaunWhite
- Posts: 10472
- Joined: Sat Sep 03, 2016 3:42 am
Rules are always checked continuously but will only fire the number of times you specify. If you specify 2 triggers then it will still be checked every few milliseconds but it will only execute the command a maximum of two times when the conditions are met.
- ringo.simpkins
- Posts: 28
- Joined: Thu Oct 17, 2019 6:49 am
Thanks for the advice, I shall re edit the file and carry on testing.
With Greening rules I prefer to have tighter control using signals i.e
Goal scored condition:
Set a signal only
Whatever your trigger threshold is to detect the goal
Signal GoalScored is NOT set
in Signal tab - set signal GoalScored
Greening Condition:
Green all
Signal Goalscored IS set
GreenAgain is NOT set
in Signal tab - set signal GreenAgain
2nd Greening condition:
Green all
GreenAgain signal changed between 8-10s ago
GreenFinished is NOT set
in Signal tab - set signal GreenFinished
By setting a signal after each condition fires, and checking it isn't set initially you are ensuring it only runs once. The next condition is then dependent on the previous signal being set. You can then put a timed delay via a Signal Changed on your 2nd safety green to ensure it doesnt fire too soon, before the first green up has a decent chance to place and match.
You could fire the green up on the first condition but doing it this way gives you the option to put a delay on the 1st green if you need to wait for prices to settle etc
Goal scored condition:
Set a signal only
Whatever your trigger threshold is to detect the goal
Signal GoalScored is NOT set
in Signal tab - set signal GoalScored
Greening Condition:
Green all
Signal Goalscored IS set
GreenAgain is NOT set
in Signal tab - set signal GreenAgain
2nd Greening condition:
Green all
GreenAgain signal changed between 8-10s ago
GreenFinished is NOT set
in Signal tab - set signal GreenFinished
By setting a signal after each condition fires, and checking it isn't set initially you are ensuring it only runs once. The next condition is then dependent on the previous signal being set. You can then put a timed delay via a Signal Changed on your 2nd safety green to ensure it doesnt fire too soon, before the first green up has a decent chance to place and match.
You could fire the green up on the first condition but doing it this way gives you the option to put a delay on the 1st green if you need to wait for prices to settle etc