I would suggest you start with just 2 coins, optimize, then incrementally increase the complexity of the selection process.
Main(choose_coin)
fix k \\ k would be like a day or some logical period for testing
start loop SWITCH
t=0
while t < k
evaluate{ profit(coin1), profit(coin2) }
if profit(coin1) > profit(coin2)
do mine coin1
else
do mine coin2
end if
end while
t++
if t = k
go to test
if test = SWITCH
coins++
go to Main()
else get a day job
coins++ could mean to choose a 3rd coin:
so you'd have something like
but you could increment coins in a nested iterative way