This repository has been archived by the owner on Feb 15, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Completely rework --buy_max_amt (#1494)
* Completely rework --buy_max_amt 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 * Profit * Fix profit calculation for stats and API * Add deposit to Web GUI's capital row * Profit starts at 100% on reset * WebUI Print deposit only if enabled * Add deposit to sim/exchange * Less invasive profit fix * Use deposit for profit/stats in sim if enabled * Remove prev_trades dashboard sorting * Restore prev_trades dashboard sorting * Resolve upstream conflicts * Update engine.test to match changes As deposit no longer overrides buy_pct this is kinda expected... * Update engine.test to match changes #2 With deposit set order would be below minimum with asset on hold * Reset profit on deposit change
- Loading branch information
Showing
8 changed files
with
106 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
0d0bfd3
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.
can you make bot do multi buy ?
bot it can buy . It just only one . it can't do it the same time
DEBUG this below when other bot session command buy . (Other session status buying )
2018-05-03 09:46:23 - preparing buy order over 2372.00000000 XVG of 0.0199739 BTC (100%) tradeable balance with a expected fee of 0.00001998 BTC (0.1%)
2018-05-03 09:46:23 - buy delayed: +49.93% of funds (0.0099836 BTC) on hold
0d0bfd3
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.
I'm running a simulation in maker (fee = 0%) and without --deposit option.
At the end of the simulation, the end balence is different before and after this commit (101.69 against 102.65).
Is it intentional?
What is the difference between s.net_currency, s.balance.currency and s.balance.deposit?