Skip to content

Instantly share code, notes, and snippets.

@mementum
Created July 22, 2019 22:06
Show Gist options
  • Save mementum/f80d6e64bf44d335a2aef9ef86816d61 to your computer and use it in GitHub Desktop.
Save mementum/f80d6e64bf44d335a2aef9ef86816d61 to your computer and use it in GitHub Desktop.
# remove those no longer top ranked
# do this first to issue sell orders and free cash
for d in (d for d in posdata if d not in rtop):
self.log('Exit {} - Rank {:.2f}'.format(d._name, rbot[d][0]))
self.order_target_percent(d, target=0.0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment