Stored values comparison

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

Trying to do some automation with stored values. What I do is storing the highest traded price for each runner - one rule for each selection. Then I want to compare values to set triggers.
automation_pic1.png
How do I set up this correctly?? I store value as book% so need to compare it with current book % for the specified selection. If current book% > stored value+xx% than trigger an action (simple sound notification at the current moment)
You do not have the required permissions to view the files attached to this post.
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

Can someone tell why this works incorrectly?
automation_pic2.png
Condition is simple - if current price is bigger than already saved - update the value with new price. But it updates with lower prices..

Code: Select all

31.05.2018 10:46:50: [G_Auto] :  Store Value: runnerHigh_1 = 1.66
31.05.2018 10:46:50: [G_Auto] :  Store Value: runnerHigh_3 = 13
31.05.2018 10:50:03: [G_Auto] :  Store Value: runnerHigh_2 = 7.4
31.05.2018 10:56:29: [G_Auto] :  Store Value: runnerHigh_1 = 1.65
You do not have the required permissions to view the files attached to this post.
User avatar
Dallas
Posts: 22713
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Your previous stored value for that selection was recorded over 10 mins ago but your HROC condition is not looking back that far - just 15 secs
User avatar
jimibt
Posts: 3665
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

a better way to do this would be to actually use the stored value itself for this comparison, i.e. compare the current stored value with the value that you want to target and only update if that value is LESS than the current stored value. the reason that your current implementation does not work is because you are not limiting the update of the value in this way -you are updating if a condition is met on the historic relative odds, however, those odds could have been bouncing around in the period between caching the value.

i'll try to whipup a super simple example of capturing that one scenario that you are targetting. also, you do not need to give the variables individual names (i.e. runnerHigh_1 etc) as the variables are stored at runnerlevel and thus can all have the same name as they are private to that runner. this makes your rules more generic and easier to follow.
User avatar
jimibt
Posts: 3665
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

Ok, as promised, a quick 'n dirty example that tracks the high and low price of a runner and then places a back bet when there is a range of 10 ticks between the high and low and the LTP is closer to the high (i.e 2-3 ticks away)...

enjoy.
You do not have the required permissions to view the files attached to this post.
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

Thanks for your help, guys.
jimibt, yes you are correct - LTP must be compared to a previously stored value. And thanks for an example. I just keep variables with different name to track how it works. It's my first steps in automation.

However I still have a question about comparing values as booking%. Currently I saving odds but it's just to check how everything works. What I need is to store book% and act on it's increase/decrase in %%.

If this condition for a trigger will work? Should I use "amount" as ajustment measure? if it will be amount in % if I compare book% stored in a variable?
automation_pic3.png
You do not have the required permissions to view the files attached to this post.
User avatar
jimibt
Posts: 3665
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

book% gets stored asa whole number, i.e, 2.00 odds would equal 50, 5 odds would equal 20 etc...so yes, book% is a perfectly valid (and potentially better) comparison to use as it's a universal currency of sorts..
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

automation_pic4.png
Unfortunately, ajustment in BA can't be relative - this make very hard to work with book% :( maybe it should be added. I will send them email on this.


UPDATED: Just found clarification from Dallas. Looks like it should work...
You do not have the required permissions to view the files attached to this post.
Last edited by RedBrain on Thu May 31, 2018 11:23 am, edited 1 time in total.
User avatar
Dallas
Posts: 22713
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

RedBrain wrote:
Thu May 31, 2018 11:05 am
automation_pic4.png

Unfortunately, ajustment in BA can't be relative - this make very hard to work with book% :( maybe it should be added. I will send them email on this.
Its there already 'amount'
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

jimibt wrote:
Thu May 31, 2018 9:32 am
Ok, as promised, a quick 'n dirty example that tracks the high and low price of a runner and then places a back bet when there is a range of 10 ticks between the high and low and the LTP is closer to the high (i.e 2-3 ticks away)...

enjoy.
Another question. Why do you use "shared" when saving a variable? If you say that runnerHigh is automatically linked to each selection.
User avatar
jimibt
Posts: 3665
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

RedBrain wrote:
Thu May 31, 2018 11:44 am
jimibt wrote:
Thu May 31, 2018 9:32 am
Ok, as promised, a quick 'n dirty example that tracks the high and low price of a runner and then places a back bet when there is a range of 10 ticks between the high and low and the LTP is closer to the high (i.e 2-3 ticks away)...

enjoy.
Another question. Why do you use "shared" when saving a variable? If you say that runnerHigh is automatically linked to each selection.
checking *shared* allows this variable to be used by other functions inside BA. For example, you could add a custom column to the one-click screen that showed the values of these variables (that's why i recommend using a single name per variable ;))
User avatar
ShaunWhite
Posts: 9731
Joined: Sat Sep 03, 2016 3:42 am

Shared also means that it's shared between markets on the same event.

Stored Values
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

I modified my rule to the following:
automation_pic6.png
And also added a column to one click screen (great idea:) ) and something strange. It triggers every single time and rewite the variable with higher value in spite it has a "less" rule. I also added extra rule to make the variable 100%, because it looks like it's 0 at default.


31.05.2018 14:26:38: [G_Auto] : Store Value: runnerHigh = 100
31.05.2018 14:26:38: [G_Auto] : Store Value: runnerHigh = 33.784
31.05.2018 14:27:21: [G_Auto] : Store Value: runnerHigh = 33.784
31.05.2018 14:28:05: [G_Auto] : Store Value: runnerHigh = 33.784
31.05.2018 14:28:48: [G_Auto] : Store Value: runnerHigh = 33.557
31.05.2018 14:29:31: [G_Auto] : Store Value: runnerHigh = 33.333
31.05.2018 14:30:15: [G_Auto] : Store Value: runnerHigh = 33.557
You do not have the required permissions to view the files attached to this post.
User avatar
jimibt
Posts: 3665
Joined: Mon Nov 30, 2015 6:42 pm
Location: Narnia

RedBrain wrote:
Thu May 31, 2018 12:41 pm
I modified my rule to the following:
automation_pic6.png

And also added a column to one click screen (great idea:) ) and something strange. It triggers every single time and rewite the variable with higher value in spite it has a "less" rule. I also added extra rule to make the variable 100%, because it looks like it's 0 at default.


31.05.2018 14:26:38: [G_Auto] : Store Value: runnerHigh = 100
31.05.2018 14:26:38: [G_Auto] : Store Value: runnerHigh = 33.784
31.05.2018 14:27:21: [G_Auto] : Store Value: runnerHigh = 33.784
31.05.2018 14:28:05: [G_Auto] : Store Value: runnerHigh = 33.784
31.05.2018 14:28:48: [G_Auto] : Store Value: runnerHigh = 33.557
31.05.2018 14:29:31: [G_Auto] : Store Value: runnerHigh = 33.333
31.05.2018 14:30:15: [G_Auto] : Store Value: runnerHigh = 33.557
the reason for the value getting set all the time is because you've also added a condition whereby the old value must be less than the new value PLUS 0.1 %. if the value is unchanged, then it will of course update the stored value. I would remove that baggage as it is actually interfering with the clean execution of the intention of that little function.
User avatar
RedBrain
Posts: 37
Joined: Tue Apr 17, 2018 8:20 pm

Actually no. It does not affect. I added this +0.1 trying to stop trigger it every single time, because I thought since I compare book% - it can sligtly change every time without affecting the odds on the selection. But without it - it still triggered every single time.

I found out that problem was in second condition.
automation_pic7.PNG
But I thought that all these conditions must be true AND. This is just to cut out big odds.

But this fixed odd condition set the rule to fire up every time..
You do not have the required permissions to view the files attached to this post.
Post Reply

Return to “Bet Angel - Automation”