Test
This commit is contained in:
@@ -2235,7 +2235,9 @@ int64_t komodo_pricecorrelated(uint32_t *rawprices,int32_t numprices)
|
|||||||
{
|
{
|
||||||
if ( (price= rawprices[i]) == 0 )
|
if ( (price= rawprices[i]) == 0 )
|
||||||
return(0);
|
return(0);
|
||||||
|
fprintf(stderr,"%.4f ",(double)price/10000);
|
||||||
sum += price * 10000;
|
sum += price * 10000;
|
||||||
}
|
}
|
||||||
|
fprintf(stderr," ave %.8f [%d]\n",((double)sum/numprices)/COIN,numprices);
|
||||||
return(sum / numprices);
|
return(sum / numprices);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1229,13 +1229,12 @@ UniValue prices(const UniValue& params, bool fHelp)
|
|||||||
ret.push_back(Pair("timestamps",timestamps));
|
ret.push_back(Pair("timestamps",timestamps));
|
||||||
ret.push_back(Pair("firstheight", (int64_t)nextheight-1-i));
|
ret.push_back(Pair("firstheight", (int64_t)nextheight-1-i));
|
||||||
}
|
}
|
||||||
for (j=1; j<numpricefeeds; j++)
|
for (j=1; j<2; j++)
|
||||||
{
|
{
|
||||||
UniValue item(UniValue::VOBJ),p(UniValue::VARR);
|
UniValue item(UniValue::VOBJ),p(UniValue::VARR);
|
||||||
if ( (str= komodo_pricename(name,j)) != 0 )
|
if ( (str= komodo_pricename(name,j)) != 0 )
|
||||||
{
|
{
|
||||||
item.push_back(Pair("name",str));
|
item.push_back(Pair("name",str));
|
||||||
fprintf(stderr,"%s from %d to %d width.%d %d\n",name,j*width,j*width+maxsamples+daywindow,width,width*numpricefeeds);
|
|
||||||
for (i=0; i<maxsamples+daywindow; i++)
|
for (i=0; i<maxsamples+daywindow; i++)
|
||||||
{
|
{
|
||||||
offset = j*width + i;
|
offset = j*width + i;
|
||||||
|
|||||||
Reference in New Issue
Block a user