Skip to content

Sth strange by potential_trades sort and TraderBot #55

@631068264

Description

@631068264

In arbitrage.observers.traderbot.TraderBot#end_opportunity_finder

def end_opportunity_finder(self):
    if not self.potential_trades:
        return
    self.potential_trades.sort(key=lambda x: x[0])
    # Execute only the best (more profitable)
    self.execute_trade(*self.potential_trades[0][1:])

potential_trades sort by profit and use 0 index not -1
Why choice the most lowest profit params to trade ?

And I think we should find the max_volume to trade before calculate profit not in the opportunity method in TraderBot . I think the profit will more real and make sence.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions