Iter + seed

This commit is contained in:
jl777
2019-04-02 05:28:11 -11:00
parent 2417ee8787
commit 9070b3298f
2 changed files with 2 additions and 3 deletions

View File

@@ -2242,7 +2242,7 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int
for (iter=0; iter<daywindow; iter++)
{
correlation = 0;
i = (j + seed) % daywindow;
i = (iter + seed) % daywindow;
refprice = rawprices[i];
highprice = (refprice * (COIN + PRICES_MAXCHANGE*3)) / COIN;
lowprice = (refprice * (COIN - PRICES_MAXCHANGE*3)) / COIN;
@@ -2264,7 +2264,7 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int
if ( correlation > (daywindow>>1) )
{
n = 0;
i = (j + seed) % daywindow;
i = (iter + seed) % daywindow;
for (k=0; k<daywindow; k++,i++)
{
if ( i >= daywindow )