Store a moving average in a history lisst

Advanced automation available in Guardian - Chat with others and share files here.
Post Reply
fingers21
Posts: 49
Joined: Sat Nov 03, 2018 2:41 pm

Doess anyone knoww if it is possible to store a moviing average over x number of seconds (like the back price for example) in a history list?
User avatar
goat68
Posts: 2048
Joined: Tue Jun 30, 2020 3:53 pm

fingers21 wrote:
Sun Dec 06, 2020 4:16 pm
Doess anyone knoww if it is possible to store a moviing average over x number of seconds (like the back price for example) in a history list?
Does guardian have the notion of a 'compute' stored value operation? You could anything you want with the values then?
Eg.storeMA7 = last7backstorevalues/7

There are various ways you could define a function.
Anbell
Posts: 2407
Joined: Fri Apr 05, 2019 2:31 am

fingers21 wrote:
Sun Dec 06, 2020 4:16 pm
Doess anyone knoww if it is possible to store a moviing average over x number of seconds (like the back price for example) in a history list?
Its possible but you might have to go through some steps to get there.
fingers21
Posts: 49
Joined: Sat Nov 03, 2018 2:41 pm

Thank you for the responsse Anbel and Goat. Would either of you care to elaborate a bit furter as to how something like this could be achieved?
User avatar
goat68
Posts: 2048
Joined: Tue Jun 30, 2020 3:53 pm

fingers21 wrote:
Sun Dec 06, 2020 8:06 pm
Thank you for the responsse Anbel and Goat. Would either of you care to elaborate a bit furter as to how something like this could be achieved?
I've no idea...I've just been reading the user guide, and had the similar thought you did but I can't see how it can be achieved with the current stored value conditions and rules.
I was looking for a stored value condition that took something like an Excel function definition...
jamesg46
Posts: 3772
Joined: Sat Jul 30, 2016 1:05 pm

It is possible but using stored values instead of History Lists.

The interval would dictate the amount of stored values you would need. For example a 30ma over 10 mins would be 20 stored values.

Set/Modify store stored value:
10 Mins before start time, until 09:30 before start time. Trigger 30 times once a second. Store the value and then devide by an entered amount (30)

Repeat that process 20 times with 20 different stored value names and then export them to excel to a single row where you can then plot to a chart, or do whatever it is you need.

That's the only way I can think of doing it and probably the route I'd take if I was to. Maybe there is an easier way but it's above me.
jamesg46
Posts: 3772
Joined: Sat Jul 30, 2016 1:05 pm

Actually thinking into it a little you would have to go do two stored values for each time period because you would have to use a second stored value to devide the first stored value and that would give you the average... a pain in the arse but isn't everything.
User avatar
goat68
Posts: 2048
Joined: Tue Jun 30, 2020 3:53 pm

jamesg46 wrote:
Sun Dec 06, 2020 8:30 pm
It is possible but using stored values instead of History Lists.

The interval would dictate the amount of stored values you would need. For example a 30ma over 10 mins would be 20 stored values.

Set/Modify store stored value:
10 Mins before start time, until 09:30 before start time. Trigger 30 times once a second. Store the value and then devide by an entered amount (30)

Repeat that process 20 times with 20 different stored value names and then export them to excel to a single row where you can then plot to a chart, or do whatever it is you need.

That's the only way I can think of doing it and probably the route I'd take if I was to. Maybe there is an easier way but it's above me.
Can you create a stored value, say called 30ma, which is the sum of 30 other stored values? Those being the back value every second over the last 30 seconds/30.
Then you could create a signal say 7ma crosses 30ma etc..
jamesg46
Posts: 3772
Joined: Sat Jul 30, 2016 1:05 pm

Nope, im lost... I dont think any of what I said will work. Beats me.
fingers21
Posts: 49
Joined: Sat Nov 03, 2018 2:41 pm

Thank you all.

It seems that a lot af the data used to plot graphs is not availble to use in automation. The MA of the back priice is an example that comes to mind.
Quite clearly, for the app to be able to plot a graph, it must store the data somewhere but the question is where? :?
Post Reply

Return to “Bet Angel - Automation”