Merge branch 'margin-db' into margin-commands

This commit is contained in:
Sam Germain 2021-07-12 19:45:28 -06:00
commit 95e52a3cee
3 changed files with 44 additions and 46 deletions

View File

@ -651,7 +651,6 @@ class LocalTrade():
return self.interest_mode(borrowed=borrowed, rate=rate, hours=hours) return self.interest_mode(borrowed=borrowed, rate=rate, hours=hours)
def calc_close_trade_value(self, rate: Optional[float] = None, def calc_close_trade_value(self, rate: Optional[float] = None,
fee: Optional[float] = None, fee: Optional[float] = None,
interest_rate: Optional[float] = None) -> float: interest_rate: Optional[float] = None) -> float:
""" """
@ -719,7 +718,6 @@ class LocalTrade():
If interest_rate is not set self.interest_rate will be used If interest_rate is not set self.interest_rate will be used
:return: profit ratio as float :return: profit ratio as float
""" """
close_trade_value = self.calc_close_trade_value( close_trade_value = self.calc_close_trade_value(
rate=(rate or self.close_rate), rate=(rate or self.close_rate),
fee=(fee or self.fee_close), fee=(fee or self.fee_close),

View File

@ -3,61 +3,62 @@ site_url: https://www.freqtrade.io/
repo_url: https://github.com/freqtrade/freqtrade repo_url: https://github.com/freqtrade/freqtrade
use_directory_urls: True use_directory_urls: True
nav: nav:
- Home: index.md - Home: index.md
- Quickstart with Docker: docker_quickstart.md - Quickstart with Docker: docker_quickstart.md
- Installation: - Installation:
- Linux/MacOS/Raspberry: installation.md - Linux/MacOS/Raspberry: installation.md
- Windows: windows_installation.md - Windows: windows_installation.md
- Freqtrade Basics: bot-basics.md - Freqtrade Basics: bot-basics.md
- Configuration: configuration.md - Configuration: configuration.md
- Strategy Customization: strategy-customization.md - Strategy Customization: strategy-customization.md
- Plugins: plugins.md - Plugins: plugins.md
- Stoploss: stoploss.md - Stoploss: stoploss.md
- Start the bot: bot-usage.md - Start the bot: bot-usage.md
- Control the bot: - Control the bot:
- Telegram: telegram-usage.md - Telegram: telegram-usage.md
- REST API & FreqUI: rest-api.md - REST API & FreqUI: rest-api.md
- Web Hook: webhook-config.md - Web Hook: webhook-config.md
- Data Downloading: data-download.md - Data Downloading: data-download.md
- Backtesting: backtesting.md - Backtesting: backtesting.md
- Hyperopt: hyperopt.md - Leverage: leverage.md
- Utility Sub-commands: utils.md - Hyperopt: hyperopt.md
- Plotting: plotting.md - Utility Sub-commands: utils.md
- Data Analysis: - Plotting: plotting.md
- Jupyter Notebooks: data-analysis.md - Data Analysis:
- Strategy analysis: strategy_analysis_example.md - Jupyter Notebooks: data-analysis.md
- Exchange-specific Notes: exchanges.md - Strategy analysis: strategy_analysis_example.md
- Advanced Topics: - Exchange-specific Notes: exchanges.md
- Advanced Post-installation Tasks: advanced-setup.md - Advanced Topics:
- Edge Positioning: edge.md - Advanced Post-installation Tasks: advanced-setup.md
- Advanced Strategy: strategy-advanced.md - Edge Positioning: edge.md
- Advanced Hyperopt: advanced-hyperopt.md - Advanced Strategy: strategy-advanced.md
- Sandbox Testing: sandbox-testing.md - Advanced Hyperopt: advanced-hyperopt.md
- FAQ: faq.md - Sandbox Testing: sandbox-testing.md
- SQL Cheat-sheet: sql_cheatsheet.md - FAQ: faq.md
- Updating Freqtrade: updating.md - SQL Cheat-sheet: sql_cheatsheet.md
- Deprecated Features: deprecated.md - Updating Freqtrade: updating.md
- Contributors Guide: developer.md - Deprecated Features: deprecated.md
- Contributors Guide: developer.md
theme: theme:
name: material name: material
logo: 'images/logo.png' logo: "images/logo.png"
favicon: 'images/logo.png' favicon: "images/logo.png"
custom_dir: 'docs/overrides' custom_dir: "docs/overrides"
palette: palette:
- scheme: default - scheme: default
primary: 'blue grey' primary: "blue grey"
accent: 'tear' accent: "tear"
toggle: toggle:
icon: material/toggle-switch-off-outline icon: material/toggle-switch-off-outline
name: Switch to dark mode name: Switch to dark mode
- scheme: slate - scheme: slate
primary: 'blue grey' primary: "blue grey"
accent: 'tear' accent: "tear"
toggle: toggle:
icon: material/toggle-switch-off-outline icon: material/toggle-switch-off-outline
name: Switch to dark mode name: Switch to dark mode
extra_css: extra_css:
- 'stylesheets/ft.extra.css' - "stylesheets/ft.extra.css"
extra_javascript: extra_javascript:
- javascripts/config.js - javascripts/config.js
- https://polyfill.io/v3/polyfill.min.js?features=es6 - https://polyfill.io/v3/polyfill.min.js?features=es6

View File

@ -238,7 +238,6 @@ def test_calc_open_close_trade_price(limit_buy_order, limit_sell_order, fee):
@pytest.mark.usefixtures("init_persistence") @pytest.mark.usefixtures("init_persistence")
def test_trade_close(limit_buy_order, limit_sell_order, fee): def test_trade_close(limit_buy_order, limit_sell_order, fee):
# TODO: limit_buy_order and limit_sell_order aren't used, remove them probably
trade = Trade( trade = Trade(
pair='ETH/BTC', pair='ETH/BTC',
stake_amount=0.001, stake_amount=0.001,