thanks,
Simple Moving Average on graphs
Simple Moving Average on graphs
Would it be possible in iCompta to graph not only the point value in time of an account (or a set of accounts) but also the Simple moving average to these values (http://en.wikipedia.org/wiki/Moving_average). As an example, a SMA30 or SMA45 are used by some financial institutions to evaluate whether you're a good or bad customer, so i'd like to know how I rank 
thanks,
thanks,
- Angeman
- Administrateur
- Posts: 2397
- Joined: 28 December 2008, 21:28
- Location: Toulouse, France
- Contact:
Re: Simple Moving Average on graphs
Yes I'll take a look at it and maybe I'll add it in a future release.
Re: Simple Moving Average on graphs
Thanks
I will be very happy to code it if its just a engineer-time restriction 
ps: lyricapps est-elle une société française ?
ps: lyricapps est-elle une société française ?
- Angeman
- Administrateur
- Posts: 2397
- Joined: 28 December 2008, 21:28
- Location: Toulouse, France
- Contact:
Re: Simple Moving Average on graphs
Yes it would help a lot if you could work on the algorithmAqntbghd wrote:Thanks I will be very happy to code it if its just a engineer-time restriction
Oui, il y a d'ailleurs un forum dédié en français : http://forums.lyricapps.fr/Aqntbghd wrote:ps: lyricapps est-elle une société française ?
Re: Simple Moving Average on graphs
easy/facileAngeman wrote:Yes it would help a lot if you could work on the algorithmAqntbghd wrote:Thanks I will be very happy to code it if its just a engineer-time restriction
Code: Select all
//A nice array that contains all the money values for everyday with now being MAX_DAYS
float money_per_day[MAX_DAYS];
// returns the SMA value for this_day averaged over days_average
float SMA(int this_day, int days_average) {
// if the asked day is smaller than the averaging period before it, then return a fake one. another solution is to return 0.0 as it might be disturbing to have wrong averages.
if this_day<days_average {return SMA(this_day,this_day)}
float sum=0.0;
for (int i=0; i<days_average;i++) {
sum+=money_per_day[this_day-i];
}
return (sum/days_average);
}
float SMA45(int this_day) {return SMA(this_day,45);}
Re: Simple Moving Average on graphs
Any news on that feature request ? 
- Angeman
- Administrateur
- Posts: 2397
- Joined: 28 December 2008, 21:28
- Location: Toulouse, France
- Contact:
Re: Simple Moving Average on graphs
It won't be included in iCompta 5 sorry but maybe in a 5.x update.

