I'm not sure this is calculated properly since marketChange is `sum(last-first)/first` (ratio) then avgMarketChange is `ratio/num_samples*100`. That's... average percent change between each sample? Doesn't sound right. (unless I misunderstand what's referenced in candles)
Haha, variable for first candle is `fistCandle` [0].
Pretty mangled code. Weird to have to iterate over `avgPrice` to get pairs. This is calculating the average market change across all pairs for which `avgPrice` is tracked in this PaperWallet, whatever that means.
I'm not sure this is calculated properly since marketChange is `sum(last-first)/first` (ratio) then avgMarketChange is `ratio/num_samples*100`. That's... average percent change between each sample? Doesn't sound right. (unless I misunderstand what's referenced in candles)