|
|
@ -256,7 +256,7 @@ void smooth1024(double dest[],double src[],int32_t smoothiters) |
|
|
|
float _calc_pricey(register double price,register double weekave) |
|
|
|
{ |
|
|
|
if ( price != 0. && weekave != 0. ) |
|
|
|
return(.2 * calc_loganswer(weekave,price)); |
|
|
|
return(calc_loganswer(weekave,price)); |
|
|
|
else return(0.f); |
|
|
|
} |
|
|
|
|
|
|
@ -506,7 +506,7 @@ double _output_line(int32_t calclogflag,double ave,double *output,double *buf,in |
|
|
|
if ( ave != 1. ) |
|
|
|
yval = _calc_pricey(val,ave); |
|
|
|
else yval = val; |
|
|
|
//printf("%f ",yval);
|
|
|
|
printf("(%f -> %f) ",val,yval); |
|
|
|
if ( fabs(yval) > .0000000001 ) |
|
|
|
{ |
|
|
|
aveabs += fabs(yval); |
|
|
@ -886,7 +886,7 @@ char *stats_prices(char *symbol,char *dest,struct DEXstats_disp *prices,int32_t |
|
|
|
sum /= i; |
|
|
|
uint32_t val,height = 400,*bitmap = calloc(sizeof(*bitmap),height * numdates*24); |
|
|
|
uint8_t red,green,blue,*tmpptr,*bytemap = calloc(sizeof(*bytemap),3 * height * numdates*24); |
|
|
|
output_line(0,sum,output,i,0xff00ff,bitmap,numdates*24,height); |
|
|
|
output_line(1,sum,output,i,0xff00ff,bitmap,numdates*24,height); |
|
|
|
tmpptr = bytemap; |
|
|
|
for (j=0; j<height*numdates*24; j++) |
|
|
|
{ |
|
|
|