Skip to content

Crypto issue with fractional size #1329

@apollace

Description

@apollace

Enhancement description

Due to the high value of single crypto coins, e.g. BTC, it is impossible to do a backtest with absolute quantities instead of fractional quantities. As soon as the size is below 0 it is not an absolute values anymore.

Code sample

# This means 10% of my portfolio, what if I want to buy 0.1 BTC? 
self.buy(size=0.1, limit=buy_price, sl=buy_price * (1 - self.sl))

Additional info, images

No response

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