Store Value (range calc) issue

Advanced automation available in Guardian - Chat with others and share files here.
AngelsWithDirtyFaces
Posts: 56
Joined: Tue Jul 05, 2011 12:08 am

Dallas wrote:
Sat Sep 25, 2021 6:06 pm
I've just shut my BA down for the night so can't check the file till morning

Just to answer this part though from the end of your post
When you only look at the end of a log and see identical outputs, you don't realise that some further up might be different.


The SV is showing the average just from now till 10 secs (or at least that's what the earlier files where doing), so the average could be different anywhere within the log and return back to same values several times

ie, if you get a lull in activity then that's going to cause the average value get closer to the latest stored value and after 10 secs (at the most) it will be back to exactly the same as the latest stored value
Thanks for your observations again Dallas. Always appreciate how much time and effort you put into the forum.

To address your point about lulls in activity. My log was tracking reported volume in the last minutes before the off of a race at Newmarket.

In the final 30 seconds of my log total volume increased by approximately £58,000.

In every second of that final 30, total volume as stored in HL 1 was higher than the previous second. And in every one of those final 30 seconds the figure reported by test_avg was identical to HL 1 to the penny.

So I'm at a loss with these findings when I would expect the average for the last 10 seconds to always be lower than HL1 if HL 1 is increasing during this period. I'm assuming here that the average will add up the last 10 HL1 readings and divide by 10 in my sample rule?

Thanks again
User avatar
Dabbla
Posts: 662
Joined: Wed Apr 15, 2009 1:50 pm

It seems like it should work as it is but doesn’t. Even storing the book% as a separate SV doesn’t seem to work.

To be honest I didn’t even know you could use averages I this way, so maybe im missing something.

I have got it to work by changing to selection rather than market. I have not done the maths but it looks right.


25/09/2021 21:00:05: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 102.086
25/09/2021 21:00:05: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.91
25/09/2021 21:00:06: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 102.086
25/09/2021 21:00:06: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.972
25/09/2021 21:00:08: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 101.459
25/09/2021 21:00:08: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.794
25/09/2021 21:00:09: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 101.795
25/09/2021 21:00:09: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.775
HL Avg v06.baf
You do not have the required permissions to view the files attached to this post.
AngelsWithDirtyFaces
Posts: 56
Joined: Tue Jul 05, 2011 12:08 am

Dabbla wrote:
Sun Sep 26, 2021 9:28 am
It seems like it should work as it is but doesn’t. Even storing the book% as a separate SV doesn’t seem to work.

To be honest I didn’t even know you could use averages I this way, so maybe im missing something.

I have got it to work by changing to selection rather than market. I have not done the maths but it looks right.


25/09/2021 21:00:05: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 102.086
25/09/2021 21:00:05: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.91
25/09/2021 21:00:06: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 102.086
25/09/2021 21:00:06: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.972
25/09/2021 21:00:08: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 101.459
25/09/2021 21:00:08: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.794
25/09/2021 21:00:09: [G_Auto 4] : Store Value (Shared) in History List 2 for 1. Coney Kroll = 101.795
25/09/2021 21:00:09: [G_Auto 4] : Store (range calc) Value (Shared) for 1. Coney Kroll: test_avg 2 = 101.775

HL Avg v06.baf
Yes, I believe it's definitley MARKET HL related as well.
As another test I've used the "Seconds until event start" value and stored it in both a SELECTION and MARKET HL. Trigger 50 times rearm every second. Create two separate SVs. One to average the SELECTION HL and one to average the MARKET HL. They should of course give the same result. The average of the SELECTION HL appears to work but the average of the MARKET HL carries on reporting the latest value of MARKET HL.

Glad someone else has spotted the issue. Thought it was just me. :)
User avatar
Dallas
Posts: 22673
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

AngelsWithDirtyFaces wrote:
Sat Sep 25, 2021 6:34 pm
Dallas wrote:
Sat Sep 25, 2021 6:06 pm
I've just shut my BA down for the night so can't check the file till morning

Just to answer this part though from the end of your post
When you only look at the end of a log and see identical outputs, you don't realise that some further up might be different.


The SV is showing the average just from now till 10 secs (or at least that's what the earlier files where doing), so the average could be different anywhere within the log and return back to same values several times

ie, if you get a lull in activity then that's going to cause the average value get closer to the latest stored value and after 10 secs (at the most) it will be back to exactly the same as the latest stored value
Thanks for your observations again Dallas. Always appreciate how much time and effort you put into the forum.

To address your point about lulls in activity. My log was tracking reported volume in the last minutes before the off of a race at Newmarket.

In the final 30 seconds of my log total volume increased by approximately £58,000.

In every second of that final 30, total volume as stored in HL 1 was higher than the previous second. And in every one of those final 30 seconds the figure reported by test_avg was identical to HL 1 to the penny.

So I'm at a loss with these findings when I would expect the average for the last 10 seconds to always be lower than HL1 if HL 1 is increasing during this period. I'm assuming here that the average will add up the last 10 HL1 readings and divide by 10 in my sample rule?

Thanks again
I had to logon early this morning to check something so done some more testing while I was there.

As in my earlier tests when storing and averaging either the Selection or the Market both were working but I did notice something when;

Creating 'two pairs' of Stored values (both on same rule) with logging
one to store value 'A' on selection in HL1
and average the selection in HL1

other to store value 'A' on market in HL2
and average the market in HL2

I noticed the two averages deviated over time, so as value 'A' continually changes the average value widens especially as you use a longer history period ie, 120-180 secs
Using a 10sec period and if there's little activity as I noticed yesterday as the value and average converged so do both the averages before starting again as Value 'A' changes

But if you set it to average over say 180 secs then the deviation only continues to get wider as time goes by

So to me it would look like one of the two averages is wrong - but that could be the selection average or the market average

It may be something as simple as a different number of decimal places (out of sight of the user) being used for market and selection and with rounding over time its pushing them out of alignment.
I'll flag it to dev tomorrow morning to run through the debugger as I don't think any further testing will shed much more light on it or provide anything more concreate
AngelsWithDirtyFaces
Posts: 56
Joined: Tue Jul 05, 2011 12:08 am

Dallas wrote:
Sun Sep 26, 2021 3:14 pm

I had to logon early this morning to check something so done some more testing while I was there.

As in my earlier tests when storing and averaging either the Selection or the Market both were working but I did notice something when;

Creating 'two pairs' of Stored values (both on same rule) with logging
one to store value 'A' on selection in HL1
and average the selection in HL1

other to store value 'A' on market in HL2
and average the market in HL2

I noticed the two averages deviated over time, so as value 'A' continually changes the average value widens especially as you use a longer history period ie, 120-180 secs
Using a 10sec period and if there's little activity as I noticed yesterday as the value and average converged so do both the averages before starting again as Value 'A' changes

But if you set it to average over say 180 secs then the deviation only continues to get wider as time goes by

So to me it would look like one of the two averages is wrong - but that could be the selection average or the market average

It may be something as simple as a different number of decimal places (out of sight of the user) being used for market and selection and with rounding over time its pushing them out of alignment.
I'll flag it to dev tomorrow morning to run through the debugger as I don't think any further testing will shed much more light on it or provide anything more concreate
Thanks Dallas,

It's probably worth pointing out to the dev team that Summing the stored values also doesn't work for me in the Market HL. Indeed with hindsight I should have checked the sum function earlier because of course summing values over ten seconds isn't affected by activity lulls like the average would be as you pointed out yesterday. To summarise, summing ten seconds of values in a SELECTION HL works but summing 10 seconds of MARKET HL reports only the latest HL value.

Cheers
User avatar
Dallas
Posts: 22673
Joined: Sun Aug 09, 2015 10:57 pm
Location: Working From Home

Just to update you on this dev managed to find the cause of this, there was a bug and in short when checking the range of values on the market (selections were fine) it was starting one step past the end of the data queue and looping round to the start, once the reason was found it was a simple fix and just needed '-1' to correct it starting one step past the end when looping through the sample.
It will have been there since added in V1.56 so it was a good spot and will be fixed before V1.57 is formally released.
AngelsWithDirtyFaces
Posts: 56
Joined: Tue Jul 05, 2011 12:08 am

Dallas wrote:
Tue Sep 28, 2021 2:55 pm
Just to update you on this dev managed to find the cause of this, there was a bug and in short when checking the range of values on the market (selections were fine) it was starting one step past the end of the data queue and looping round to the start, once the reason was found it was a simple fix and just needed '-1' to correct it starting one step past the end when looping through the sample.
It will have been there since added in V1.56 so it was a good spot and will be fixed before V1.57 is formally released.
Apologies for the late response Dallas.

Many thanks to you and the Dev team in turning this issue around in quick time. I've downloaded 1.57.0.b2 and all looks well.
Cheers.
Post Reply

Return to “Bet Angel - Automation”