I am trying to have the portfolio change weight automatically, but it seems like its buying and then selling within the same minute.

Author