-
Notifications
You must be signed in to change notification settings - Fork 2k
Conversation
Just noticed that this doesn't cover the stats returned by Leave it open for now.. |
I finally had some time to polish the whole thing and fix the profit calculation for sims. Note that the balance (last/end) reported by stats in live/paper/sim mode will now use deposit as its base value instead of the absolute balance if |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, this is a much requested feature and I think this makes it a lot more clear. Thanks!
if (so.buy_max_amt) { | ||
console.log(('--buy_max_amt is deprecated, use --deposit instead!\n').red) | ||
so.deposit = so.buy_max_amt | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
As much as i like the --buy_max_amt feature i was never a fan of how it was implemented, leave alone the naming being confusing at best as it simply doesn't just account for the amount the bot can buy but how much he is actually able to trade. * Renames --buy_max_amt to --deposit for sake of clarification * Using --buy_max_amt will still work but print a deprecated warning * Instead of using --deposit to size buy orders use it to limit the balance available to the bot * This allows us to use it together with --buy_pct * --deposit will still account for asset held to calculate the available currency balance * So if the asset held is covering --deposit the bot will have 0 currency (0% of currency balance) available, if not currency will be filled to the point it compensates for the difference (up to 100% of currency balance) * If deposit is exceeding asset + currency the bot will also use 100% of currency balance held * Deposit will be updated on each price change and new period to ensure the bot always only trades the amount as defined by --deposit * Profit calculation will no longer go havoc as long as currency balance doesn't fall below whats currently deposited into the bot * If enabled this will add two new columns to the output displaying the total currency balance (in green) as well as how much percentage (gray) of currency balance (0 - 100%) is currently used by the bot * Works in Live, Paper & Sim mode
3816115
to
3edca5b
Compare
As deposit no longer overrides buy_pct this is kinda expected...
With deposit set order would be below minimum with asset on hold
As much as i like the --buy_max_amt feature i was never a fan of how it was implemented, leave alone the naming being confusing at best as it simply doesn't just account for the amount the bot can buy but how much he is actually able to trade.
as long as currency balance doesn't fall below whats currently deposited into the bot