From 70a3c49ff6a3ac584ffe1c10e6b82a3b69661389 Mon Sep 17 00:00:00 2001 From: Tyler Simpson Date: Thu, 29 Aug 2024 18:06:00 +0000 Subject: [PATCH] Deployed f30664d with MkDocs version: 1.6.0 --- installation/index.html | 18 +++++++++--------- search/search_index.json | 2 +- sitemap.xml.gz | Bin 127 -> 127 bytes 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/installation/index.html b/installation/index.html index 0da99828..2ca0d463 100644 --- a/installation/index.html +++ b/installation/index.html @@ -831,14 +831,14 @@

Quickstart

Installing Python 3.11

To install Python 3.11 on your system, follow these steps:

    -
  1. -

    Update the package list and install the necessary dependencies: - sudo apt update - sudo apt install -y build-essential gdb lcov pkg-config \ - libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \ - libncurses5-dev libreadline-dev libsqlite3-dev libssl-dev \ - lzma lzma-dev tk-dev uuid-dev zlib1g-dev

    -
  2. +
  3. Update the package list and install the necessary dependencies: + sudo apt update
  4. +
+

sudo apt install -y wget build-essential libssl-dev zlib1g-dev \ + libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev \ + libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev \ + libffi-dev uuid-dev libnss3-dev libgdbm-compat-dev

+
  1. Download the Python 3.11.0 source code: cd /opt @@ -858,7 +858,7 @@

    Installing Python 3.11

  2. Compile Python: - sudo make -j 8

    + sudo make -j 2

  3. Install Python 3.11: diff --git a/search/search_index.json b/search/search_index.json index 15186082..b59936a5 100644 --- a/search/search_index.json +++ b/search/search_index.json @@ -1 +1 @@ -{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Directional Scalper","text":"

    Welcome to the documentation for Directional Scalper.

    "},{"location":"#links","title":"Links","text":"
    • Website
    • API (BYBIT)
    • Discord
    Directional Scalper API Scraper Dashboard Directional Scalper Multi Menu GUI

    Quantum Void Labs is a non-profit organization dedicated to developing open-source applications. We specialize in developing algorithms that are freely available to the public under the MIT License.

    Our focus is on contributing to the global knowledge base rather than commercializing our work.

    We do not sell products or services; instead, we aim to encourage innovation and collaboration within the ecosystem through our open-source contributions.

    "},{"location":"configuration/","title":"Configuration","text":""},{"location":"configuration/#account-section","title":"Account Section","text":"

    Configure your account settings in the account.json file under the account section. This includes API keys, account names, and other related settings.

    "},{"location":"configuration/#parameters","title":"Parameters:","text":"
    • name: Exchange name
    • api_key: Your exchange API key.
    • api_secret: Your exchange API secret.
    • account_name: A name to identify your account configuration.
    "},{"location":"configuration/#accounts","title":"Accounts","text":"

    Configure your accounts using 'account.json' in the configs folder.

    {\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"api_key\": \"your_api_key\",\n            \"api_secret\": \"your_api_secret\"\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"api_key\": \"your_api_key\",\n            \"api_secret\": \"your_api_secret\"\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"api_key\": \"your_api_key\",\n            \"api_secret\": \"your_api_secret\"\n        }\n    ]\n}\n
    "},{"location":"configuration/#bot-section","title":"Bot Section","text":"

    Configure your bot settings in the config.json file under the bot section. This includes strategy parameters, risk management settings, and other related settings.

    "},{"location":"configuration/#risk-management-parameters","title":"Risk management parameters","text":"
    • Exchange leverage is MAX CROSS on all pairs by default: Changing user_defined_leverage does not change leverage on exchange instead it changes the amount the bot is allowed to use.
    • user_defined_leverage_long: This parameter defines the leverage to use for long positions. Leverage is a multiplier that increases the size of the position and the potential profit/loss. For example, a leverage of 10 means that for every $1 you have, you can place a trade worth $10. Be careful with this setting as higher leverage also increases the risk.
    • user_defined_leverage_short: This parameter defines the leverage to use for short positions. Similar to user_defined_leverage_long, it's a multiplier that increases the size of the position and the potential profit/loss.
    "},{"location":"configuration/#risk-management-explanation","title":"Risk Management Explanation","text":"

    Risk Management plays a crucial role in trading strategies, as it helps protect the trader's capital and limits potential losses. In the provided code snippet, there are several parameters and calculations related to risk management. Let's dive into each of them and provide examples to clarify their usage.

    • user_defined_leverage_long and user_defined_leverage_short:
    • These parameters allow the user to specify the leverage for long and short positions, respectively.
    • Leverage is a multiplier that increases the size of the position and the potential profit/loss.
    • Example:

      • If user_defined_leverage_long is set to 5, it means that for every $1 of the trader's capital, they can open a long position worth $5.
      • Similarly, if user_defined_leverage_short is set to 3, it means that for every $1 of the trader's capital, they can open a short position worth $3.
    • wallet_exposure_limit_long and wallet_exposure_limit_short:

    • These parameters define the maximum percentage of the trader's total equity that can be allocated to long and short positions, respectively.
    • They help limit the overall exposure to risk by controlling the amount of capital deployed in each position.
    • Example:

      • If wallet_exposure_limit_long is set to 0.1 (10%), it means that the maximum amount allocated to long positions cannot exceed 10% of the total equity.
      • Similarly, if wallet_exposure_limit_short is set to 0.05 (5%), it means that the maximum amount allocated to short positions cannot exceed 5% of the total equity.
    • Effective Leverage Calculation:

    • The effective leverage used in trading is calculated as total_equity * wallet_exposure_limit * leverage_used.
    • This calculation determines the maximum position value based on the trader's total equity, wallet exposure limit, and the selected leverage.
    • Example:

      • Let's say a trader has a total equity of $10,000, wallet_exposure_limit_long is set to 0.1 (10%), and user_defined_leverage_long is set to 5.
      • The maximum position value for long positions would be: $10,000 * 0.1 * 5 = $5,000.
      • This means that the trader can open long positions with a total value of up to $5,000.
    • enforce_full_grid:

    • This parameter determines whether the trading strategy should enforce a full grid of positions or allow partial grid usage.
    • If enforce_full_grid is set to True, the code calculates the required notional amount by dividing the maximum position value by the number of levels.
    • If enforce_full_grid is set to False, the code uses the maximum position value as the required notional amount.
    • Example:

      • Let's say the maximum position value is $5,000, and the trading strategy uses 5 levels.
      • If enforce_full_grid is True, the required notional amount for each level would be: $5,000 / 5 = $1,000.
      • If enforce_full_grid is False, the required notional amount would be the full $5,000.
    • Adjusting Maximum Position Value:

    • The code takes into account the current position value (long or short) and adjusts the maximum position value accordingly.
    • It calculates the current position value by multiplying the position quantity (long or short) with the respective best ask or bid price.
    • The adjusted maximum position value is then calculated by subtracting the current position value from the original maximum position value.
    • Example:
      • Let's say the maximum position value is $5,000, and the trader currently holds a long position with a quantity of 2 units at a best ask price of $100.
      • The current position value would be: 2 * $100 = $200.
      • The adjusted maximum position value would be: $5,000 - $200 = $4,800.
      • This means that the trader can open additional positions with a total value of up to $4,800.

    These risk management parameters and calculations help traders control their exposure to risk, limit potential losses, and manage their positions effectively. By adjusting these parameters based on their risk tolerance and trading strategy, traders can optimize their risk management approach and protect their capital.

    "},{"location":"configuration/#linear-grid-strategy-parameters","title":"Linear Grid Strategy Parameters","text":"

    Here are the parameters for the linear_grid strategy in your config.json file:

    • max_qty_percent_long: Defines the maximum percentage of your wallet balance that can be used for long positions.
    • max_qty_percent_short: Defines the maximum percentage of your wallet balance that can be used for short positions.
    • auto_reduce_cooldown_enabled: Boolean parameter that determines whether the auto-reduce cooldown feature is enabled. This feature automatically reduces the size of your positions after a certain period.
    • auto_reduce_cooldown_start_pct: Defines the percentage at which the auto-reduce cooldown feature starts.
    • wallet_exposure_limit_long: Defines the maximum exposure limit for long positions as a percentage of your wallet balance.
    • wallet_exposure_limit_short: Defines the maximum exposure limit for short positions as a percentage of your wallet balance.
    • levels: Defines the number of grid levels, representing the total number of buy and sell orders placed above and below the current price level.
    • strength: Defines the strength of the grid. A higher value means the grid levels are spaced further apart.
    • outer_price_distance: Defines the distance from the current price to the outermost grid levels.
    • min_outer_price_distance: Defines the minimum distance from the current price to the outermost grid levels.
    • max_outer_price_distance: Defines the maximum distance from the current price to the outermost grid levels.
    • long_mode: Boolean parameter that determines whether the bot can open long positions.
    • short_mode: Boolean parameter that determines whether the bot can open short positions.
    • reissue_threshold: Defines the threshold at which the bot will reissue orders that have been partially filled.
    • buffer_percentage: Defines the buffer percentage for the grid. This is the percentage of the price range kept empty between the outermost grid levels and the upper and lower price limits.
    • initial_entry_buffer_pct: Defines the buffer percentage for the initial entry.
    • min_buffer_percentage: Defines the minimum buffer percentage for the grid.
    • max_buffer_percentage: Defines the maximum buffer percentage for the grid.
    • enforce_full_grid: Boolean parameter that determines whether the bot should always maintain a full grid of orders.
    • min_buffer_percentage_ar: Defines the minimum buffer percentage for auto-reduce.
    • max_buffer_percentage_ar: Defines the maximum buffer percentage for auto-reduce.
    • upnl_auto_reduce_threshold_long: Defines the unrealized profit and loss (UPNL) threshold for auto-reducing long positions.
    • upnl_auto_reduce_threshold_short: Defines the UPNL threshold for auto-reducing short positions.
    • failsafe_enabled: Boolean parameter that determines whether the failsafe feature is enabled. This feature automatically closes all positions if the UPNL reaches a certain threshold.
    • failsafe_start_pct: Defines the percentage at which the failsafe feature starts.
    • long_failsafe_upnl_pct: Defines the UPNL percentage for the long failsafe.
    • short_failsafe_upnl_pct: Defines the UPNL percentage for the short failsafe.
    "},{"location":"configuration/#example-configuration-snippet","title":"Example Configuration Snippet","text":"
    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0029,\n        \"max_upnl_profit_pct\": 0.0040,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 50,\n        \"min_qty_threshold\": 0,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [],\n        \"dashboard_enabled\": false,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": false,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 30,\n            \"max_qty_percent_short\": 30,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 0.006,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 30.0,\n            \"upnl_auto_reduce_threshold_short\": 30.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.07,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n          \"name\": \"bybit\",\n          \"account_name\": \"account_1\",\n          \"symbols_allowed\": 10\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n
    "},{"location":"control_center/","title":"Control Center","text":""},{"location":"control_center/#configuring-the-password","title":"Configuring the Password","text":"
    1. Open the config.toml file in the directionalscalper/controlcenter/ directory in a text editor: nano config.toml
    2. Add or update the [credentials] section with your desired password: [credentials] password = \"your_password_here\"
    3. Save the file and close the editor.
    "},{"location":"control_center/#starting-the-streamlit-dashboard","title":"Starting the Streamlit Dashboard","text":"

    To start the Streamlit dashboard (Control Center) for Directional Scalper, follow these steps:

    1. Navigate to the directionalscalper/controlcenter/ directory: cd directionalscalper/controlcenter/
    2. Ensure you have Streamlit installed. If not, you can install it using: pip install streamlit
    3. Run the dashboard using Streamlit: streamlit run dashboard.py
    4. The dashboard will prompt for a password. You need to configure this password in the config.toml file located in the same directory.
    "},{"location":"control_center/#accessing-the-dashboard","title":"Accessing the Dashboard","text":"

    Once the dashboard is running, you can access it through your web browser by navigating to the local URL provided by Streamlit (usually http://localhost:8501). Ensure that your firewall or network settings allow access to this port if you are accessing it remotely.

    "},{"location":"installation/","title":"Installation","text":""},{"location":"installation/#vps-setup","title":"VPS Setup","text":"

    To set up a VPS (Virtual Private Server) for running the bot, follow these steps:

    1. Choose a VPS Provider: Select a VPS provider such as Hetzner, DigitalOcean, AWS, or Linode. For optimal performance, it is recommended to use a Hetzner 4 core 8GB Intel server. Create an account and set up a new VPS instance with at least 4 Cores and 8GB of RAM and a suitable operating system (e.g., Ubuntu 20.04).

    2. Connect to Your VPS: Use SSH to connect to your VPS. Replace your_vps_ip with the IP address of your VPS. ssh root@your_vps_ip

    3. Update and Upgrade Packages: Ensure your VPS is up to date. sudo apt update && sudo apt upgrade -y

    4. Install Python 3.11: Follow the instructions in the \"Installing Python 3.11\" section below to install Python 3.11 on your VPS.

    5. Install Git: If Git is not already installed, install it using: sudo apt install git -y

    6. Clone the Repository: Clone the Directional Scalper repository to your VPS: git clone https://github.com/donewiththedollar/directionalscalper.git

    7. Install Dependencies: Install the required Python dependencies. pip3.11 install -r requirements.txt

    8. Configure the Bot: Rename the configuration files and add your API keys as described in the \"Quickstart\" section.

    9. Run the Bot: Start the bot using the appropriate command as described in the \"Quickstart\" section.

    "},{"location":"installation/#prerequisites","title":"Prerequisites","text":"

    Before you begin, ensure you have the following prerequisites:

    • Python 3.11+
    • pip
    • git
    "},{"location":"installation/#quickstart","title":"Quickstart","text":"
    1. Clone the repository: git clone https://github.com/donewiththedollar/directionalscalper.git

      Change current working directory to the project directory: cd directionalscalper

    2. Install the required dependencies: pip3.11 install -r requirements.txt

    3. Rename the config_example.json to config.json located in the /configs folder. Also rename account_example.json to account.json and add your API key(s) to the account.json file located in the /configs folder.

    4. Run the bot:

    5. To display the menu and select a strategy, use the following command: python3.11 multi_bot_aio.py --config configs/config.json or the old method python3.11 multi_bot_v4.py --config config.json (outdated)
    6. Alternatively, you can run the bot with command line parameters:
      • For the multi-bot auto symbol rotator strategy: python3.11 multi_bot_v3.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json
      • For the old single coin strategy (outdated): python3.11 bot.py --exchange bybit --symbol DOGEUSDT --strategy qstrendob --config configs/config.json
    "},{"location":"installation/#installing-python-311","title":"Installing Python 3.11","text":"

    To install Python 3.11 on your system, follow these steps:

    1. Update the package list and install the necessary dependencies: sudo apt update sudo apt install -y build-essential gdb lcov pkg-config \\ libbz2-dev libffi-dev libgdbm-dev libgdbm-compat-dev liblzma-dev \\ libncurses5-dev libreadline-dev libsqlite3-dev libssl-dev \\ lzma lzma-dev tk-dev uuid-dev zlib1g-dev

    2. Download the Python 3.11.0 source code: cd /opt wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz

    3. Extract the downloaded archive: sudo tar -xzf Python-3.11.0.tgz

    4. Change to the extracted directory: cd Python-3.11.0

    5. Configure the build with optimizations: sudo ./configure --enable-optimizations --prefix=/usr/local

    6. Compile Python: sudo make -j 8

    7. Install Python 3.11: sudo make altinstall

    8. Verify the installation: python3.11 --version

    You should see the installed Python version displayed.

    That's it! You have now installed Python 3.11 on your system.

    "},{"location":"risk_management/","title":"Risk Management in DirectionalScalper","text":"

    This document explains the risk management strategies implemented in the trading bot, focusing on four key parameters from the configuration.

    "},{"location":"risk_management/#example-key-configuration-parameters","title":"Example Key Configuration Parameters","text":"
    1. wallet_exposure_limit_long: 0.006 (0.6%)
    2. wallet_exposure_limit_short: 0.002 (0.2%)
    3. max_qty_percent_long: 30%
    4. max_qty_percent_short: 30%
    "},{"location":"risk_management/#understanding-the-parameters","title":"Understanding the Parameters","text":""},{"location":"risk_management/#wallet-exposure-limits","title":"Wallet Exposure Limits","text":"

    The wallet_exposure_limit_long and wallet_exposure_limit_short parameters define the maximum percentage of the total equity that can be allocated to long and short positions, respectively.

    • Long positions: Up to 0.6% of total equity
    • Short positions: Up to 0.2% of total equity

    These limits help prevent overexposure to any single trading direction and maintain a balanced risk profile.

    "},{"location":"risk_management/#maximum-quantity-percentages","title":"Maximum Quantity Percentages","text":"

    The max_qty_percent_long and max_qty_percent_short parameters set the maximum allowed position size as a percentage of the total equity for long and short positions, respectively.

    • Both long and short positions: Up to 30% of total equity

    These limits act as an additional safety measure to prevent any single position from becoming too large relative to the total equity.

    "},{"location":"risk_management/#risk-management-implementation","title":"Risk Management Implementation","text":"

    The bot implements risk management through the check_and_manage_positions function. Here's how it works:

    1. Calculate Maximum Allowed Positions:

      • For long positions: max_qty_long = (total_equity * wallet_exposure_limit_long) / current_price
      • For short positions: max_qty_short = (total_equity * wallet_exposure_limit_short) / current_price
    2. Calculate Position Exposure Percentages:

      • Long exposure: (long_pos_qty * current_price / total_equity) * 100
      • Short exposure: (short_pos_qty * current_price / total_equity) * 100
    3. Check Against Maximum Quantity Percentages:

      • If long exposure > max_qty_percent_long:
        • Clear long grid
        • Remove symbol from active grids
        • Add symbol to max_qty_reached_symbol_long set
      • If short exposure > max_qty_percent_short:
        • Clear short grid
        • Remove symbol from active grids
        • Add symbol to max_qty_reached_symbol_short set
    4. Recovery Mechanism:

      • If a symbol's exposure falls below the maximum allowed percentage, it is removed from the respective max_qty_reached_symbol set, allowing trading to resume.
    "},{"location":"risk_management/#additional-risk-management-features","title":"Additional Risk Management Features","text":""},{"location":"risk_management/#proper-dca-dollar-cost-averaging-implementation","title":"Proper DCA (Dollar Cost Averaging) Implementation","text":"

    The bot uses two functions for implementing a proper DCA strategy:

    1. calculate_total_amount_notional_ls_properdca:

      • Calculates the total notional amount for a grid based on the wallet exposure limits and current position values.
      • Ensures that the total position value (including existing positions) doesn't exceed the maximum allowed exposure.
    2. calculate_order_amounts_notional_properdca:

      • Distributes the total notional amount across multiple orders in the grid.
      • Uses a strength parameter to adjust the distribution, allowing for more aggressive or conservative strategies.
      • Ensures that each order meets minimum notional and quantity requirements set by the exchange.
    "},{"location":"risk_management/#drawdown-behavior","title":"Drawdown Behavior","text":"

    The bot supports different drawdown behaviors, which define how capital is allocated during drawdown scenarios:

    "},{"location":"risk_management/#default-drawdown-behavior-maxqtypercent","title":"Default Drawdown Behavior: maxqtypercent","text":"
    1. Behavior Explanation:

      • In the default maxqtypercent behavior, the bot gradually allocates capital to grid levels as the market moves against the position. The allocation is influenced by the strength parameter, which controls the distribution of capital across levels.
      • This approach aims to dollar cost average (DCA) into the position, spreading the risk and allowing the position to recover as the market retraces.
    2. Impact on Order Sizing:

      • Capital is distributed across the specified number of grid levels based on the strength parameter. Higher strength values will allocate more capital to levels further from the current price.
      • The bot adjusts the total amount to ensure that the position size remains within the defined wallet exposure limits.
    "},{"location":"risk_management/#new-drawdown-behavior-aggressive-full-distribution","title":"New Drawdown Behavior: Aggressive Full Distribution","text":"
    1. Behavior Explanation:

      • When drawdown_behavior is set to aggressive_full_distribution, the bot aggressively allocates the full remaining allowable capital to a specified number of grid levels.
      • This approach aims to quickly recover from a drawdown by placing large orders that can bring the open position back to the current price and into profit.
    2. Impact on Order Sizing:

      • The entire adjusted maximum position value, calculated by subtracting the current position value from the maximum position value (based on wallet exposure limits), is distributed across the grid levels.
      • The strength parameter influences how the capital is distributed among the levels. Higher strength values will allocate more capital to levels further from the current price, while lower strength values will result in a more even distribution.
      • Unlike the default DCA approach, this behavior does not adjust based on the current position size within the grid, focusing instead on maximizing the deployment of available capital.
    3. Risk Considerations:

      • The aggressive_full_distribution behavior can lead to very large orders, especially if the wallet exposure limit is high (e.g., set to 1.0). This approach increases the potential for quick recovery but also raises the risk of significant drawdowns if the market moves unfavorably.
      • It is crucial to carefully manage and understand the implications of using this behavior, as it prioritizes aggressive recovery over conservative risk management.
    "},{"location":"risk_management/#grid-management","title":"Grid Management","text":"
    • The bot clears grids when position sizes exceed the maximum allowed percentages.
    • It uses sets (max_qty_reached_symbol_long and max_qty_reached_symbol_short) to track symbols that have reached their maximum allowed quantities.
    • Trading is paused for symbols in these sets until their exposure falls below the maximum allowed percentage.
    "},{"location":"risk_management/#conclusion","title":"Conclusion","text":"

    This risk management system provides a comprehensive approach to controlling exposure and managing position sizes. By using wallet exposure limits and maximum quantity percentages, the bot maintains a balanced risk profile while allowing for effective trading across multiple symbols and strategies.

    The implementation of proper DCA, dynamic grid management, and the new aggressive drawdown behavior further enhances the bot's ability to adapt to market conditions while adhering to predefined risk parameters.

    "},{"location":"strategies%20copy/","title":"Strategies","text":""},{"location":"strategies%20copy/#linear-grid-strategy","title":"Linear Grid Strategy","text":""},{"location":"strategies%20copy/#overview","title":"Overview","text":"

    The Linear Grid Strategy is a trading strategy designed to capitalize on market fluctuations by placing multiple buy and sell orders at predefined intervals (grid levels) above and below the current price level. This strategy helps in capturing profits in both upward and downward market movements.

    "},{"location":"strategies%20copy/#configuration-parameters","title":"Configuration Parameters","text":"

    Here are the parameters for the linear_grid strategy in your config.json file:

    • max_qty_percent_long: Defines the maximum percentage of your wallet balance that can be used for long positions.
    • max_qty_percent_short: Defines the maximum percentage of your wallet balance that can be used for short positions.
    • auto_reduce_cooldown_enabled: Boolean parameter that determines whether the auto-reduce cooldown feature is enabled. This feature automatically reduces the size of your positions after a certain period.
    • auto_reduce_cooldown_start_pct: Defines the percentage at which the auto-reduce cooldown feature starts.
    • wallet_exposure_limit_long: Defines the maximum exposure limit for long positions as a percentage of your wallet balance.
    • wallet_exposure_limit_short: Defines the maximum exposure limit for short positions as a percentage of your wallet balance.
    • levels: Defines the number of grid levels, representing the total number of buy and sell orders placed above and below the current price level.
    • strength: Defines the strength of the grid. A higher value means the grid levels are spaced further apart.
    • outer_price_distance: Defines the distance from the current price to the outermost grid levels.
    • min_outer_price_distance: Defines the minimum distance from the current price to the outermost grid levels.
    • max_outer_price_distance: Defines the maximum distance from the current price to the outermost grid levels.
    • long_mode: Boolean parameter that determines whether the bot can open long positions.
    • short_mode: Boolean parameter that determines whether the bot can open short positions.
    • reissue_threshold: Defines the threshold at which the bot will reissue orders that have been partially filled.
    • buffer_percentage: Defines the buffer percentage for the grid. This is the percentage of the price range kept empty between the outermost grid levels and the upper and lower price limits.
    • initial_entry_buffer_pct: Defines the buffer percentage for the initial entry.
    • min_buffer_percentage: Defines the minimum buffer percentage for the grid.
    • max_buffer_percentage: Defines the maximum buffer percentage for the grid.
    • enforce_full_grid: Boolean parameter that determines whether the bot should always maintain a full grid of orders.
    • min_buffer_percentage_ar: Defines the minimum buffer percentage for auto-reduce.
    • max_buffer_percentage_ar: Defines the maximum buffer percentage for auto-reduce.
    • upnl_auto_reduce_threshold_long: Defines the unrealized profit and loss (UPNL) threshold for auto-reducing long positions.
    • upnl_auto_reduce_threshold_short: Defines the UPNL threshold for auto-reducing short positions.
    • failsafe_enabled: Boolean parameter that determines whether the failsafe feature is enabled. This feature automatically closes all positions if the UPNL reaches a certain threshold.
    • failsafe_start_pct: Defines the percentage at which the failsafe feature starts.
    • long_failsafe_upnl_pct: Defines the UPNL percentage for the long failsafe.
    • short_failsafe_upnl_pct: Defines the UPNL percentage for the short failsafe.
    "},{"location":"strategies%20copy/#example-configurations","title":"Example Configurations","text":""},{"location":"strategies%20copy/#example-long-and-short-auto-rotating-futures-configuration","title":"Example long and short auto rotating futures configuration","text":"

    This strategy is based on machine learning based signals and utilizes a grid with proper DCA so each grid level is \"meaningful\" to bring the position to current market price staying \"sticky\" to price action.

    Set up your config.json from the below snippet

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0029,\n        \"max_upnl_profit_pct\": 0.0040,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 50,\n        \"min_qty_threshold\": 0,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [],\n        \"dashboard_enabled\": false,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": false,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 30,\n            \"max_qty_percent_short\": 30,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 0.006,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 30.0,\n            \"upnl_auto_reduce_threshold_short\": 30.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.07,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n          \"name\": \"bybit\",\n          \"account_name\": \"account_1\",\n          \"symbols_allowed\": 10\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n

    Now, just run the bot using this multibot version and strategy

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    "},{"location":"strategies%20copy/#example-long-only-solusdt-futures-configuration","title":"Example long only SOLUSDT futures configuration","text":"

    Set up your config.json from the below snippet to whitelist SOLUSDT and set max USD value to a higher value to allow for the symbol.

    max_qty_percent_long and max_qty_pct_short are set high in this configuration, you can adjust them as needed these are just defaults for testing purposes.

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0032,\n        \"max_upnl_profit_pct\": 0.0039,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 1000,\n        \"min_qty_threshold\": 0,\n        \"long_liq_pct\": 0.05,\n        \"short_liq_pct\": 0.05,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [\"SOLUSDT\"],\n        \"dashboard_enabled\": true,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": true,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 10000,\n            \"max_qty_percent_short\": 10000,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 1,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": false,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 10.0,\n            \"upnl_auto_reduce_threshold_short\": 10.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.05,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"symbols_allowed\": 2\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n\n

    Now, just run the bot using this multibot version and strategy

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    This is just a simple example of a long only BTCUSDT strategy to show how one can utilize a single strategy for many use case scenarios on different instruments.

    "},{"location":"strategies%20copy/#example-high-risk-small-account-longshort-btcusdt-futures-configuration","title":"Example High risk small account long&short BTCUSDT futures configuration","text":"

    Set up your config.json from the below snippet to whitelist BTCUSDT and set max USD value to a high value to allow for the symbol.

    max_qty_percent_long and max_qty_pct_short are set high in this configuration, you can adjust them as needed these are just defaults for testing purposes.

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0032,\n        \"max_upnl_profit_pct\": 0.0039,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 1000,\n        \"min_qty_threshold\": 0,\n        \"long_liq_pct\": 0.05,\n        \"short_liq_pct\": 0.05,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"ETHUSDT\"],\n        \"whitelist\": [\"BTCUSDT\"],\n        \"dashboard_enabled\": true,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": true,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 10000,\n            \"max_qty_percent_short\": 10000,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 1,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 10.0,\n            \"upnl_auto_reduce_threshold_short\": 10.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.05,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"symbols_allowed\": 2\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n\n

    Now, just run the bot using this multibot version and strategy

    python3.11 multi_bot_signalscreener_targetcoin.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    This is an aggressive approach because it utilizes a high max_qty_percent_long and max_qty_percent_short on a small wallet balance (ie $100 USD) for a symbol with a high USD value with the min notional requirement for BTCUSDT on Bybit it is inherently more risky but also more profitable.

    "},{"location":"strategies/","title":"Trading Strategies","text":""},{"location":"strategies/#linear-grid-strategy","title":"Linear Grid Strategy","text":"

    The Linear Grid Strategy is a sophisticated trading approach designed to capitalize on market fluctuations by placing multiple buy and sell orders at predefined intervals (grid levels) above and below the current price level. This strategy helps in capturing profits in both upward and downward market movements.

    "},{"location":"strategies/#grid-behaviors","title":"Grid Behaviors","text":"

    The Linear Grid Strategy supports different grid behaviors, allowing for flexibility and optimization based on market conditions and trading preferences. Currently, the following grid behaviors are implemented:

    1. Default Behavior: The standard grid trading approach where grid levels are calculated based on fixed or dynamic price ranges.

    2. Infinite Grid: An adaptive grid that continuously adjusts and extends as the price moves, potentially allowing for unlimited profit potential.

    3. DBSCAN-based Grid (\"dbscanalgo\"): An advanced grid behavior that uses the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm to determine grid levels based on market structure.

    More grid behaviors may be added in future updates to further enhance the strategy's versatility.

    "},{"location":"strategies/#configuration-parameters","title":"Configuration Parameters","text":"

    The Linear Grid Strategy can be fine-tuned using the following parameters in your config.json file:

    Parameter Description max_qty_percent_long Maximum percentage of wallet balance for long positions max_qty_percent_short Maximum percentage of wallet balance for short positions auto_reduce_cooldown_enabled Enable/disable auto-reduce cooldown feature auto_reduce_cooldown_start_pct Percentage at which auto-reduce cooldown starts wallet_exposure_limit_long Maximum exposure limit for long positions (% of wallet balance) wallet_exposure_limit_short Maximum exposure limit for short positions (% of wallet balance) levels Number of grid levels strength Grid strength (higher value = wider spacing between levels) outer_price_distance Distance from current price to outermost grid levels min_outer_price_distance Minimum distance to outermost grid levels max_outer_price_distance Maximum distance to outermost grid levels long_mode Enable/disable long positions short_mode Enable/disable short positions reissue_threshold Threshold for reissuing partially filled orders buffer_percentage Buffer percentage for the grid initial_entry_buffer_pct Buffer percentage for initial entry min_buffer_percentage Minimum buffer percentage max_buffer_percentage Maximum buffer percentage enforce_full_grid Always maintain a full grid of orders min_buffer_percentage_ar Minimum buffer percentage for auto-reduce max_buffer_percentage_ar Maximum buffer percentage for auto-reduce upnl_auto_reduce_threshold_long UPNL threshold for auto-reducing long positions upnl_auto_reduce_threshold_short UPNL threshold for auto-reducing short positions failsafe_enabled Enable/disable failsafe feature failsafe_start_pct Percentage at which failsafe starts long_failsafe_upnl_pct UPNL percentage for long failsafe short_failsafe_upnl_pct UPNL percentage for short failsafe"},{"location":"strategies/#example-configurations","title":"Example Configurations","text":""},{"location":"strategies/#long-and-short-auto-rotating-futures-configuration","title":"Long and Short Auto-Rotating Futures Configuration","text":"

    This configuration utilizes machine learning-based signals and implements a grid with proper DCA (Dollar Cost Averaging) to ensure each grid level meaningfully adjusts the position to the current market price.

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0029,\n        \"max_upnl_profit_pct\": 0.0040,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 50,\n        \"min_qty_threshold\": 0,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [],\n        \"dashboard_enabled\": false,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": false,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 30,\n            \"max_qty_percent_short\": 30,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 0.006,\n            \"wallet_exposure_limit_short\": 0.001,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 30.0,\n            \"upnl_auto_reduce_threshold_short\": 30.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.07,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n          \"name\": \"bybit\",\n          \"account_name\": \"account_1\",\n          \"symbols_allowed\": 20\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        },\n        {\n          \"name\": \"bitget\",\n          \"account_name\": \"account_4\",\n          \"symbols_allowed\": 5\n      }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n

    This configuration utilizes machine learning-based signals and implements a grid with proper DCA (Dollar Cost Averaging) to ensure each grid level meaningfully adjusts the position to the current market price.

    "},{"location":"strategies/#long-only-grid-targeting-one-symbol-or-more-via-whitelist-and-target_coins_mode","title":"Long only grid targeting one symbol or more via whitelist and target_coins_mode","text":"
    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0024,\n        \"max_upnl_profit_pct\": 0.0029,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 1000,\n        \"min_qty_threshold\": 0,\n        \"long_liq_pct\": 0.05,\n        \"short_liq_pct\": 0.05,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [\"SOLUSDT\"],\n        \"dashboard_enabled\": true,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"dbscanalgo\",\n            \"drawdown_behavior\": \"full_distribution\",\n            \"target_coins_mode\": true,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 10000,\n            \"max_qty_percent_short\": 10000,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 5.0,\n            \"wallet_exposure_limit_short\": 0.001,\n            \"levels\": 5,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": false,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 10.0,\n            \"upnl_auto_reduce_threshold_short\": 10.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.05,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"symbols_allowed\": 2\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n

    This configuration utilizes machine learning-based signals and implements a grid with proper DCA (Dollar Cost Averaging) to ensure each grid level meaningfully adjusts the position to the current market price, while fully utilizing the allowed wallet exposure based amount of total_equity based on wallet_exposure_limit_long and wallet_exposure_limit_short

    "},{"location":"usage/","title":"Usage","text":"

    This guide will help you run the Directional Scalper bot using various command-line instructions. Ensure you have properly configured your config.json and account.json files before proceeding.

    "},{"location":"usage/#running-the-bot","title":"Running the Bot","text":""},{"location":"usage/#easy-update-configuration-file-with-latest-parameters","title":"Easy update configuration file with latest parameters","text":"
    pip3.11 install -r requirements.txt && python3.11 update_config.py --config configs/config.json && mv configs/config.json.new configs/config.json\n
    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json\n
    "},{"location":"usage/#displaying-the-menu-and-selecting-a-strategy","title":"Displaying the Menu and Selecting a Strategy","text":"

    To display the menu and select a strategy, use the following command:

    python3.11 multi_bot_aio.py --config configs/config.json\n

    or

    python3.11 multi_bot_aio.py --config configs/config.json\n
    "},{"location":"usage/#running-the-bot-with-command-line-parameters","title":"Running the Bot with Command Line Parameters","text":"

    You can also run the bot directly with specific command-line parameters. Below are examples of different strategies you can use:

    "},{"location":"usage/#multi-bot-auto-symbol-rotator-strategy","title":"Multi-Bot Auto Symbol Rotator Strategy","text":"

    To run the multi-bot auto symbol rotator strategy, use the following command:

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json\n
    "},{"location":"usage/#old-single-coin-strategy","title":"Old Single Coin Strategy","text":"

    To run the old single coin strategy, use the following command: (likely very outdated, but can be updated by anyone or per request)

    python3.11 bot.py --exchange bybit --symbol DOGEUSDT --strategy qstrendob --config configs/config.json\n
    "},{"location":"usage/#command-line-parameters","title":"Command Line Parameters","text":""},{"location":"usage/#general-parameters","title":"General Parameters","text":"
    • --exchange: Specifies the exchange to use (e.g., bybit, binance).
    • --account_name: Specifies the account name as defined in your account.json.
    • --strategy: Specifies the trading strategy to use (e.g., qsgridob, qstrendob).
    • --config: Specifies the path to your config.json file.
    "},{"location":"usage/#example-commands","title":"Example Commands","text":"
    1. Running the Multi-Bot Auto Symbol Rotator Strategy for Bybit:

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    1. Running the Old Single Coin Strategy for DOGEUSDT on Bybit:

    python3.11 bot.py --exchange bybit --symbol DOGEUSDT --strategy qstrendob --config configs/config.json

    "},{"location":"usage/#additional-notes","title":"Additional Notes","text":"
    • Make sure to adjust the leverage, risk management, and other parameters in your config.json to suit your trading preferences.
    • For advanced usage and more strategies, refer to the Configuration and Strategies sections of the documentation.

    This guide provides a straightforward approach to running the Directional Scalper bot with various strategies and configurations. If you encounter any issues, refer to the relevant sections of the documentation for more details.

    "}]} \ No newline at end of file +{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"Directional Scalper","text":"

    Welcome to the documentation for Directional Scalper.

    "},{"location":"#links","title":"Links","text":"
    • Website
    • API (BYBIT)
    • Discord
    Directional Scalper API Scraper Dashboard Directional Scalper Multi Menu GUI

    Quantum Void Labs is a non-profit organization dedicated to developing open-source applications. We specialize in developing algorithms that are freely available to the public under the MIT License.

    Our focus is on contributing to the global knowledge base rather than commercializing our work.

    We do not sell products or services; instead, we aim to encourage innovation and collaboration within the ecosystem through our open-source contributions.

    "},{"location":"configuration/","title":"Configuration","text":""},{"location":"configuration/#account-section","title":"Account Section","text":"

    Configure your account settings in the account.json file under the account section. This includes API keys, account names, and other related settings.

    "},{"location":"configuration/#parameters","title":"Parameters:","text":"
    • name: Exchange name
    • api_key: Your exchange API key.
    • api_secret: Your exchange API secret.
    • account_name: A name to identify your account configuration.
    "},{"location":"configuration/#accounts","title":"Accounts","text":"

    Configure your accounts using 'account.json' in the configs folder.

    {\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"api_key\": \"your_api_key\",\n            \"api_secret\": \"your_api_secret\"\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"api_key\": \"your_api_key\",\n            \"api_secret\": \"your_api_secret\"\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"api_key\": \"your_api_key\",\n            \"api_secret\": \"your_api_secret\"\n        }\n    ]\n}\n
    "},{"location":"configuration/#bot-section","title":"Bot Section","text":"

    Configure your bot settings in the config.json file under the bot section. This includes strategy parameters, risk management settings, and other related settings.

    "},{"location":"configuration/#risk-management-parameters","title":"Risk management parameters","text":"
    • Exchange leverage is MAX CROSS on all pairs by default: Changing user_defined_leverage does not change leverage on exchange instead it changes the amount the bot is allowed to use.
    • user_defined_leverage_long: This parameter defines the leverage to use for long positions. Leverage is a multiplier that increases the size of the position and the potential profit/loss. For example, a leverage of 10 means that for every $1 you have, you can place a trade worth $10. Be careful with this setting as higher leverage also increases the risk.
    • user_defined_leverage_short: This parameter defines the leverage to use for short positions. Similar to user_defined_leverage_long, it's a multiplier that increases the size of the position and the potential profit/loss.
    "},{"location":"configuration/#risk-management-explanation","title":"Risk Management Explanation","text":"

    Risk Management plays a crucial role in trading strategies, as it helps protect the trader's capital and limits potential losses. In the provided code snippet, there are several parameters and calculations related to risk management. Let's dive into each of them and provide examples to clarify their usage.

    • user_defined_leverage_long and user_defined_leverage_short:
    • These parameters allow the user to specify the leverage for long and short positions, respectively.
    • Leverage is a multiplier that increases the size of the position and the potential profit/loss.
    • Example:

      • If user_defined_leverage_long is set to 5, it means that for every $1 of the trader's capital, they can open a long position worth $5.
      • Similarly, if user_defined_leverage_short is set to 3, it means that for every $1 of the trader's capital, they can open a short position worth $3.
    • wallet_exposure_limit_long and wallet_exposure_limit_short:

    • These parameters define the maximum percentage of the trader's total equity that can be allocated to long and short positions, respectively.
    • They help limit the overall exposure to risk by controlling the amount of capital deployed in each position.
    • Example:

      • If wallet_exposure_limit_long is set to 0.1 (10%), it means that the maximum amount allocated to long positions cannot exceed 10% of the total equity.
      • Similarly, if wallet_exposure_limit_short is set to 0.05 (5%), it means that the maximum amount allocated to short positions cannot exceed 5% of the total equity.
    • Effective Leverage Calculation:

    • The effective leverage used in trading is calculated as total_equity * wallet_exposure_limit * leverage_used.
    • This calculation determines the maximum position value based on the trader's total equity, wallet exposure limit, and the selected leverage.
    • Example:

      • Let's say a trader has a total equity of $10,000, wallet_exposure_limit_long is set to 0.1 (10%), and user_defined_leverage_long is set to 5.
      • The maximum position value for long positions would be: $10,000 * 0.1 * 5 = $5,000.
      • This means that the trader can open long positions with a total value of up to $5,000.
    • enforce_full_grid:

    • This parameter determines whether the trading strategy should enforce a full grid of positions or allow partial grid usage.
    • If enforce_full_grid is set to True, the code calculates the required notional amount by dividing the maximum position value by the number of levels.
    • If enforce_full_grid is set to False, the code uses the maximum position value as the required notional amount.
    • Example:

      • Let's say the maximum position value is $5,000, and the trading strategy uses 5 levels.
      • If enforce_full_grid is True, the required notional amount for each level would be: $5,000 / 5 = $1,000.
      • If enforce_full_grid is False, the required notional amount would be the full $5,000.
    • Adjusting Maximum Position Value:

    • The code takes into account the current position value (long or short) and adjusts the maximum position value accordingly.
    • It calculates the current position value by multiplying the position quantity (long or short) with the respective best ask or bid price.
    • The adjusted maximum position value is then calculated by subtracting the current position value from the original maximum position value.
    • Example:
      • Let's say the maximum position value is $5,000, and the trader currently holds a long position with a quantity of 2 units at a best ask price of $100.
      • The current position value would be: 2 * $100 = $200.
      • The adjusted maximum position value would be: $5,000 - $200 = $4,800.
      • This means that the trader can open additional positions with a total value of up to $4,800.

    These risk management parameters and calculations help traders control their exposure to risk, limit potential losses, and manage their positions effectively. By adjusting these parameters based on their risk tolerance and trading strategy, traders can optimize their risk management approach and protect their capital.

    "},{"location":"configuration/#linear-grid-strategy-parameters","title":"Linear Grid Strategy Parameters","text":"

    Here are the parameters for the linear_grid strategy in your config.json file:

    • max_qty_percent_long: Defines the maximum percentage of your wallet balance that can be used for long positions.
    • max_qty_percent_short: Defines the maximum percentage of your wallet balance that can be used for short positions.
    • auto_reduce_cooldown_enabled: Boolean parameter that determines whether the auto-reduce cooldown feature is enabled. This feature automatically reduces the size of your positions after a certain period.
    • auto_reduce_cooldown_start_pct: Defines the percentage at which the auto-reduce cooldown feature starts.
    • wallet_exposure_limit_long: Defines the maximum exposure limit for long positions as a percentage of your wallet balance.
    • wallet_exposure_limit_short: Defines the maximum exposure limit for short positions as a percentage of your wallet balance.
    • levels: Defines the number of grid levels, representing the total number of buy and sell orders placed above and below the current price level.
    • strength: Defines the strength of the grid. A higher value means the grid levels are spaced further apart.
    • outer_price_distance: Defines the distance from the current price to the outermost grid levels.
    • min_outer_price_distance: Defines the minimum distance from the current price to the outermost grid levels.
    • max_outer_price_distance: Defines the maximum distance from the current price to the outermost grid levels.
    • long_mode: Boolean parameter that determines whether the bot can open long positions.
    • short_mode: Boolean parameter that determines whether the bot can open short positions.
    • reissue_threshold: Defines the threshold at which the bot will reissue orders that have been partially filled.
    • buffer_percentage: Defines the buffer percentage for the grid. This is the percentage of the price range kept empty between the outermost grid levels and the upper and lower price limits.
    • initial_entry_buffer_pct: Defines the buffer percentage for the initial entry.
    • min_buffer_percentage: Defines the minimum buffer percentage for the grid.
    • max_buffer_percentage: Defines the maximum buffer percentage for the grid.
    • enforce_full_grid: Boolean parameter that determines whether the bot should always maintain a full grid of orders.
    • min_buffer_percentage_ar: Defines the minimum buffer percentage for auto-reduce.
    • max_buffer_percentage_ar: Defines the maximum buffer percentage for auto-reduce.
    • upnl_auto_reduce_threshold_long: Defines the unrealized profit and loss (UPNL) threshold for auto-reducing long positions.
    • upnl_auto_reduce_threshold_short: Defines the UPNL threshold for auto-reducing short positions.
    • failsafe_enabled: Boolean parameter that determines whether the failsafe feature is enabled. This feature automatically closes all positions if the UPNL reaches a certain threshold.
    • failsafe_start_pct: Defines the percentage at which the failsafe feature starts.
    • long_failsafe_upnl_pct: Defines the UPNL percentage for the long failsafe.
    • short_failsafe_upnl_pct: Defines the UPNL percentage for the short failsafe.
    "},{"location":"configuration/#example-configuration-snippet","title":"Example Configuration Snippet","text":"
    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0029,\n        \"max_upnl_profit_pct\": 0.0040,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 50,\n        \"min_qty_threshold\": 0,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [],\n        \"dashboard_enabled\": false,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": false,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 30,\n            \"max_qty_percent_short\": 30,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 0.006,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 30.0,\n            \"upnl_auto_reduce_threshold_short\": 30.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.07,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n          \"name\": \"bybit\",\n          \"account_name\": \"account_1\",\n          \"symbols_allowed\": 10\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n
    "},{"location":"control_center/","title":"Control Center","text":""},{"location":"control_center/#configuring-the-password","title":"Configuring the Password","text":"
    1. Open the config.toml file in the directionalscalper/controlcenter/ directory in a text editor: nano config.toml
    2. Add or update the [credentials] section with your desired password: [credentials] password = \"your_password_here\"
    3. Save the file and close the editor.
    "},{"location":"control_center/#starting-the-streamlit-dashboard","title":"Starting the Streamlit Dashboard","text":"

    To start the Streamlit dashboard (Control Center) for Directional Scalper, follow these steps:

    1. Navigate to the directionalscalper/controlcenter/ directory: cd directionalscalper/controlcenter/
    2. Ensure you have Streamlit installed. If not, you can install it using: pip install streamlit
    3. Run the dashboard using Streamlit: streamlit run dashboard.py
    4. The dashboard will prompt for a password. You need to configure this password in the config.toml file located in the same directory.
    "},{"location":"control_center/#accessing-the-dashboard","title":"Accessing the Dashboard","text":"

    Once the dashboard is running, you can access it through your web browser by navigating to the local URL provided by Streamlit (usually http://localhost:8501). Ensure that your firewall or network settings allow access to this port if you are accessing it remotely.

    "},{"location":"installation/","title":"Installation","text":""},{"location":"installation/#vps-setup","title":"VPS Setup","text":"

    To set up a VPS (Virtual Private Server) for running the bot, follow these steps:

    1. Choose a VPS Provider: Select a VPS provider such as Hetzner, DigitalOcean, AWS, or Linode. For optimal performance, it is recommended to use a Hetzner 4 core 8GB Intel server. Create an account and set up a new VPS instance with at least 4 Cores and 8GB of RAM and a suitable operating system (e.g., Ubuntu 20.04).

    2. Connect to Your VPS: Use SSH to connect to your VPS. Replace your_vps_ip with the IP address of your VPS. ssh root@your_vps_ip

    3. Update and Upgrade Packages: Ensure your VPS is up to date. sudo apt update && sudo apt upgrade -y

    4. Install Python 3.11: Follow the instructions in the \"Installing Python 3.11\" section below to install Python 3.11 on your VPS.

    5. Install Git: If Git is not already installed, install it using: sudo apt install git -y

    6. Clone the Repository: Clone the Directional Scalper repository to your VPS: git clone https://github.com/donewiththedollar/directionalscalper.git

    7. Install Dependencies: Install the required Python dependencies. pip3.11 install -r requirements.txt

    8. Configure the Bot: Rename the configuration files and add your API keys as described in the \"Quickstart\" section.

    9. Run the Bot: Start the bot using the appropriate command as described in the \"Quickstart\" section.

    "},{"location":"installation/#prerequisites","title":"Prerequisites","text":"

    Before you begin, ensure you have the following prerequisites:

    • Python 3.11+
    • pip
    • git
    "},{"location":"installation/#quickstart","title":"Quickstart","text":"
    1. Clone the repository: git clone https://github.com/donewiththedollar/directionalscalper.git

      Change current working directory to the project directory: cd directionalscalper

    2. Install the required dependencies: pip3.11 install -r requirements.txt

    3. Rename the config_example.json to config.json located in the /configs folder. Also rename account_example.json to account.json and add your API key(s) to the account.json file located in the /configs folder.

    4. Run the bot:

    5. To display the menu and select a strategy, use the following command: python3.11 multi_bot_aio.py --config configs/config.json or the old method python3.11 multi_bot_v4.py --config config.json (outdated)
    6. Alternatively, you can run the bot with command line parameters:
      • For the multi-bot auto symbol rotator strategy: python3.11 multi_bot_v3.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json
      • For the old single coin strategy (outdated): python3.11 bot.py --exchange bybit --symbol DOGEUSDT --strategy qstrendob --config configs/config.json
    "},{"location":"installation/#installing-python-311","title":"Installing Python 3.11","text":"

    To install Python 3.11 on your system, follow these steps:

    1. Update the package list and install the necessary dependencies: sudo apt update

    sudo apt install -y wget build-essential libssl-dev zlib1g-dev \\ libncurses5-dev libncursesw5-dev libreadline-dev libsqlite3-dev \\ libgdbm-dev libdb5.3-dev libbz2-dev libexpat1-dev liblzma-dev \\ libffi-dev uuid-dev libnss3-dev libgdbm-compat-dev

    1. Download the Python 3.11.0 source code: cd /opt wget https://www.python.org/ftp/python/3.11.0/Python-3.11.0.tgz

    2. Extract the downloaded archive: sudo tar -xzf Python-3.11.0.tgz

    3. Change to the extracted directory: cd Python-3.11.0

    4. Configure the build with optimizations: sudo ./configure --enable-optimizations --prefix=/usr/local

    5. Compile Python: sudo make -j 2

    6. Install Python 3.11: sudo make altinstall

    7. Verify the installation: python3.11 --version

    You should see the installed Python version displayed.

    That's it! You have now installed Python 3.11 on your system.

    "},{"location":"risk_management/","title":"Risk Management in DirectionalScalper","text":"

    This document explains the risk management strategies implemented in the trading bot, focusing on four key parameters from the configuration.

    "},{"location":"risk_management/#example-key-configuration-parameters","title":"Example Key Configuration Parameters","text":"
    1. wallet_exposure_limit_long: 0.006 (0.6%)
    2. wallet_exposure_limit_short: 0.002 (0.2%)
    3. max_qty_percent_long: 30%
    4. max_qty_percent_short: 30%
    "},{"location":"risk_management/#understanding-the-parameters","title":"Understanding the Parameters","text":""},{"location":"risk_management/#wallet-exposure-limits","title":"Wallet Exposure Limits","text":"

    The wallet_exposure_limit_long and wallet_exposure_limit_short parameters define the maximum percentage of the total equity that can be allocated to long and short positions, respectively.

    • Long positions: Up to 0.6% of total equity
    • Short positions: Up to 0.2% of total equity

    These limits help prevent overexposure to any single trading direction and maintain a balanced risk profile.

    "},{"location":"risk_management/#maximum-quantity-percentages","title":"Maximum Quantity Percentages","text":"

    The max_qty_percent_long and max_qty_percent_short parameters set the maximum allowed position size as a percentage of the total equity for long and short positions, respectively.

    • Both long and short positions: Up to 30% of total equity

    These limits act as an additional safety measure to prevent any single position from becoming too large relative to the total equity.

    "},{"location":"risk_management/#risk-management-implementation","title":"Risk Management Implementation","text":"

    The bot implements risk management through the check_and_manage_positions function. Here's how it works:

    1. Calculate Maximum Allowed Positions:

      • For long positions: max_qty_long = (total_equity * wallet_exposure_limit_long) / current_price
      • For short positions: max_qty_short = (total_equity * wallet_exposure_limit_short) / current_price
    2. Calculate Position Exposure Percentages:

      • Long exposure: (long_pos_qty * current_price / total_equity) * 100
      • Short exposure: (short_pos_qty * current_price / total_equity) * 100
    3. Check Against Maximum Quantity Percentages:

      • If long exposure > max_qty_percent_long:
        • Clear long grid
        • Remove symbol from active grids
        • Add symbol to max_qty_reached_symbol_long set
      • If short exposure > max_qty_percent_short:
        • Clear short grid
        • Remove symbol from active grids
        • Add symbol to max_qty_reached_symbol_short set
    4. Recovery Mechanism:

      • If a symbol's exposure falls below the maximum allowed percentage, it is removed from the respective max_qty_reached_symbol set, allowing trading to resume.
    "},{"location":"risk_management/#additional-risk-management-features","title":"Additional Risk Management Features","text":""},{"location":"risk_management/#proper-dca-dollar-cost-averaging-implementation","title":"Proper DCA (Dollar Cost Averaging) Implementation","text":"

    The bot uses two functions for implementing a proper DCA strategy:

    1. calculate_total_amount_notional_ls_properdca:

      • Calculates the total notional amount for a grid based on the wallet exposure limits and current position values.
      • Ensures that the total position value (including existing positions) doesn't exceed the maximum allowed exposure.
    2. calculate_order_amounts_notional_properdca:

      • Distributes the total notional amount across multiple orders in the grid.
      • Uses a strength parameter to adjust the distribution, allowing for more aggressive or conservative strategies.
      • Ensures that each order meets minimum notional and quantity requirements set by the exchange.
    "},{"location":"risk_management/#drawdown-behavior","title":"Drawdown Behavior","text":"

    The bot supports different drawdown behaviors, which define how capital is allocated during drawdown scenarios:

    "},{"location":"risk_management/#default-drawdown-behavior-maxqtypercent","title":"Default Drawdown Behavior: maxqtypercent","text":"
    1. Behavior Explanation:

      • In the default maxqtypercent behavior, the bot gradually allocates capital to grid levels as the market moves against the position. The allocation is influenced by the strength parameter, which controls the distribution of capital across levels.
      • This approach aims to dollar cost average (DCA) into the position, spreading the risk and allowing the position to recover as the market retraces.
    2. Impact on Order Sizing:

      • Capital is distributed across the specified number of grid levels based on the strength parameter. Higher strength values will allocate more capital to levels further from the current price.
      • The bot adjusts the total amount to ensure that the position size remains within the defined wallet exposure limits.
    "},{"location":"risk_management/#new-drawdown-behavior-aggressive-full-distribution","title":"New Drawdown Behavior: Aggressive Full Distribution","text":"
    1. Behavior Explanation:

      • When drawdown_behavior is set to aggressive_full_distribution, the bot aggressively allocates the full remaining allowable capital to a specified number of grid levels.
      • This approach aims to quickly recover from a drawdown by placing large orders that can bring the open position back to the current price and into profit.
    2. Impact on Order Sizing:

      • The entire adjusted maximum position value, calculated by subtracting the current position value from the maximum position value (based on wallet exposure limits), is distributed across the grid levels.
      • The strength parameter influences how the capital is distributed among the levels. Higher strength values will allocate more capital to levels further from the current price, while lower strength values will result in a more even distribution.
      • Unlike the default DCA approach, this behavior does not adjust based on the current position size within the grid, focusing instead on maximizing the deployment of available capital.
    3. Risk Considerations:

      • The aggressive_full_distribution behavior can lead to very large orders, especially if the wallet exposure limit is high (e.g., set to 1.0). This approach increases the potential for quick recovery but also raises the risk of significant drawdowns if the market moves unfavorably.
      • It is crucial to carefully manage and understand the implications of using this behavior, as it prioritizes aggressive recovery over conservative risk management.
    "},{"location":"risk_management/#grid-management","title":"Grid Management","text":"
    • The bot clears grids when position sizes exceed the maximum allowed percentages.
    • It uses sets (max_qty_reached_symbol_long and max_qty_reached_symbol_short) to track symbols that have reached their maximum allowed quantities.
    • Trading is paused for symbols in these sets until their exposure falls below the maximum allowed percentage.
    "},{"location":"risk_management/#conclusion","title":"Conclusion","text":"

    This risk management system provides a comprehensive approach to controlling exposure and managing position sizes. By using wallet exposure limits and maximum quantity percentages, the bot maintains a balanced risk profile while allowing for effective trading across multiple symbols and strategies.

    The implementation of proper DCA, dynamic grid management, and the new aggressive drawdown behavior further enhances the bot's ability to adapt to market conditions while adhering to predefined risk parameters.

    "},{"location":"strategies%20copy/","title":"Strategies","text":""},{"location":"strategies%20copy/#linear-grid-strategy","title":"Linear Grid Strategy","text":""},{"location":"strategies%20copy/#overview","title":"Overview","text":"

    The Linear Grid Strategy is a trading strategy designed to capitalize on market fluctuations by placing multiple buy and sell orders at predefined intervals (grid levels) above and below the current price level. This strategy helps in capturing profits in both upward and downward market movements.

    "},{"location":"strategies%20copy/#configuration-parameters","title":"Configuration Parameters","text":"

    Here are the parameters for the linear_grid strategy in your config.json file:

    • max_qty_percent_long: Defines the maximum percentage of your wallet balance that can be used for long positions.
    • max_qty_percent_short: Defines the maximum percentage of your wallet balance that can be used for short positions.
    • auto_reduce_cooldown_enabled: Boolean parameter that determines whether the auto-reduce cooldown feature is enabled. This feature automatically reduces the size of your positions after a certain period.
    • auto_reduce_cooldown_start_pct: Defines the percentage at which the auto-reduce cooldown feature starts.
    • wallet_exposure_limit_long: Defines the maximum exposure limit for long positions as a percentage of your wallet balance.
    • wallet_exposure_limit_short: Defines the maximum exposure limit for short positions as a percentage of your wallet balance.
    • levels: Defines the number of grid levels, representing the total number of buy and sell orders placed above and below the current price level.
    • strength: Defines the strength of the grid. A higher value means the grid levels are spaced further apart.
    • outer_price_distance: Defines the distance from the current price to the outermost grid levels.
    • min_outer_price_distance: Defines the minimum distance from the current price to the outermost grid levels.
    • max_outer_price_distance: Defines the maximum distance from the current price to the outermost grid levels.
    • long_mode: Boolean parameter that determines whether the bot can open long positions.
    • short_mode: Boolean parameter that determines whether the bot can open short positions.
    • reissue_threshold: Defines the threshold at which the bot will reissue orders that have been partially filled.
    • buffer_percentage: Defines the buffer percentage for the grid. This is the percentage of the price range kept empty between the outermost grid levels and the upper and lower price limits.
    • initial_entry_buffer_pct: Defines the buffer percentage for the initial entry.
    • min_buffer_percentage: Defines the minimum buffer percentage for the grid.
    • max_buffer_percentage: Defines the maximum buffer percentage for the grid.
    • enforce_full_grid: Boolean parameter that determines whether the bot should always maintain a full grid of orders.
    • min_buffer_percentage_ar: Defines the minimum buffer percentage for auto-reduce.
    • max_buffer_percentage_ar: Defines the maximum buffer percentage for auto-reduce.
    • upnl_auto_reduce_threshold_long: Defines the unrealized profit and loss (UPNL) threshold for auto-reducing long positions.
    • upnl_auto_reduce_threshold_short: Defines the UPNL threshold for auto-reducing short positions.
    • failsafe_enabled: Boolean parameter that determines whether the failsafe feature is enabled. This feature automatically closes all positions if the UPNL reaches a certain threshold.
    • failsafe_start_pct: Defines the percentage at which the failsafe feature starts.
    • long_failsafe_upnl_pct: Defines the UPNL percentage for the long failsafe.
    • short_failsafe_upnl_pct: Defines the UPNL percentage for the short failsafe.
    "},{"location":"strategies%20copy/#example-configurations","title":"Example Configurations","text":""},{"location":"strategies%20copy/#example-long-and-short-auto-rotating-futures-configuration","title":"Example long and short auto rotating futures configuration","text":"

    This strategy is based on machine learning based signals and utilizes a grid with proper DCA so each grid level is \"meaningful\" to bring the position to current market price staying \"sticky\" to price action.

    Set up your config.json from the below snippet

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0029,\n        \"max_upnl_profit_pct\": 0.0040,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 50,\n        \"min_qty_threshold\": 0,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [],\n        \"dashboard_enabled\": false,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": false,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 30,\n            \"max_qty_percent_short\": 30,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 0.006,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 30.0,\n            \"upnl_auto_reduce_threshold_short\": 30.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.07,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n          \"name\": \"bybit\",\n          \"account_name\": \"account_1\",\n          \"symbols_allowed\": 10\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n

    Now, just run the bot using this multibot version and strategy

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    "},{"location":"strategies%20copy/#example-long-only-solusdt-futures-configuration","title":"Example long only SOLUSDT futures configuration","text":"

    Set up your config.json from the below snippet to whitelist SOLUSDT and set max USD value to a higher value to allow for the symbol.

    max_qty_percent_long and max_qty_pct_short are set high in this configuration, you can adjust them as needed these are just defaults for testing purposes.

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0032,\n        \"max_upnl_profit_pct\": 0.0039,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 1000,\n        \"min_qty_threshold\": 0,\n        \"long_liq_pct\": 0.05,\n        \"short_liq_pct\": 0.05,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [\"SOLUSDT\"],\n        \"dashboard_enabled\": true,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": true,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 10000,\n            \"max_qty_percent_short\": 10000,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 1,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": false,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 10.0,\n            \"upnl_auto_reduce_threshold_short\": 10.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.05,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"symbols_allowed\": 2\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n\n

    Now, just run the bot using this multibot version and strategy

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    This is just a simple example of a long only BTCUSDT strategy to show how one can utilize a single strategy for many use case scenarios on different instruments.

    "},{"location":"strategies%20copy/#example-high-risk-small-account-longshort-btcusdt-futures-configuration","title":"Example High risk small account long&short BTCUSDT futures configuration","text":"

    Set up your config.json from the below snippet to whitelist BTCUSDT and set max USD value to a high value to allow for the symbol.

    max_qty_percent_long and max_qty_pct_short are set high in this configuration, you can adjust them as needed these are just defaults for testing purposes.

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0032,\n        \"max_upnl_profit_pct\": 0.0039,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 1000,\n        \"min_qty_threshold\": 0,\n        \"long_liq_pct\": 0.05,\n        \"short_liq_pct\": 0.05,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"ETHUSDT\"],\n        \"whitelist\": [\"BTCUSDT\"],\n        \"dashboard_enabled\": true,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": true,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 10000,\n            \"max_qty_percent_short\": 10000,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 1,\n            \"wallet_exposure_limit_short\": 0.002,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 10.0,\n            \"upnl_auto_reduce_threshold_short\": 10.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.05,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"symbols_allowed\": 2\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n\n

    Now, just run the bot using this multibot version and strategy

    python3.11 multi_bot_signalscreener_targetcoin.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    This is an aggressive approach because it utilizes a high max_qty_percent_long and max_qty_percent_short on a small wallet balance (ie $100 USD) for a symbol with a high USD value with the min notional requirement for BTCUSDT on Bybit it is inherently more risky but also more profitable.

    "},{"location":"strategies/","title":"Trading Strategies","text":""},{"location":"strategies/#linear-grid-strategy","title":"Linear Grid Strategy","text":"

    The Linear Grid Strategy is a sophisticated trading approach designed to capitalize on market fluctuations by placing multiple buy and sell orders at predefined intervals (grid levels) above and below the current price level. This strategy helps in capturing profits in both upward and downward market movements.

    "},{"location":"strategies/#grid-behaviors","title":"Grid Behaviors","text":"

    The Linear Grid Strategy supports different grid behaviors, allowing for flexibility and optimization based on market conditions and trading preferences. Currently, the following grid behaviors are implemented:

    1. Default Behavior: The standard grid trading approach where grid levels are calculated based on fixed or dynamic price ranges.

    2. Infinite Grid: An adaptive grid that continuously adjusts and extends as the price moves, potentially allowing for unlimited profit potential.

    3. DBSCAN-based Grid (\"dbscanalgo\"): An advanced grid behavior that uses the DBSCAN (Density-Based Spatial Clustering of Applications with Noise) algorithm to determine grid levels based on market structure.

    More grid behaviors may be added in future updates to further enhance the strategy's versatility.

    "},{"location":"strategies/#configuration-parameters","title":"Configuration Parameters","text":"

    The Linear Grid Strategy can be fine-tuned using the following parameters in your config.json file:

    Parameter Description max_qty_percent_long Maximum percentage of wallet balance for long positions max_qty_percent_short Maximum percentage of wallet balance for short positions auto_reduce_cooldown_enabled Enable/disable auto-reduce cooldown feature auto_reduce_cooldown_start_pct Percentage at which auto-reduce cooldown starts wallet_exposure_limit_long Maximum exposure limit for long positions (% of wallet balance) wallet_exposure_limit_short Maximum exposure limit for short positions (% of wallet balance) levels Number of grid levels strength Grid strength (higher value = wider spacing between levels) outer_price_distance Distance from current price to outermost grid levels min_outer_price_distance Minimum distance to outermost grid levels max_outer_price_distance Maximum distance to outermost grid levels long_mode Enable/disable long positions short_mode Enable/disable short positions reissue_threshold Threshold for reissuing partially filled orders buffer_percentage Buffer percentage for the grid initial_entry_buffer_pct Buffer percentage for initial entry min_buffer_percentage Minimum buffer percentage max_buffer_percentage Maximum buffer percentage enforce_full_grid Always maintain a full grid of orders min_buffer_percentage_ar Minimum buffer percentage for auto-reduce max_buffer_percentage_ar Maximum buffer percentage for auto-reduce upnl_auto_reduce_threshold_long UPNL threshold for auto-reducing long positions upnl_auto_reduce_threshold_short UPNL threshold for auto-reducing short positions failsafe_enabled Enable/disable failsafe feature failsafe_start_pct Percentage at which failsafe starts long_failsafe_upnl_pct UPNL percentage for long failsafe short_failsafe_upnl_pct UPNL percentage for short failsafe"},{"location":"strategies/#example-configurations","title":"Example Configurations","text":""},{"location":"strategies/#long-and-short-auto-rotating-futures-configuration","title":"Long and Short Auto-Rotating Futures Configuration","text":"

    This configuration utilizes machine learning-based signals and implements a grid with proper DCA (Dollar Cost Averaging) to ensure each grid level meaningfully adjusts the position to the current market price.

    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0029,\n        \"max_upnl_profit_pct\": 0.0040,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 50,\n        \"min_qty_threshold\": 0,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [],\n        \"dashboard_enabled\": false,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"infinite\",\n            \"drawdown_behavior\": \"maxqtypercent\",\n            \"target_coins_mode\": false,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 30,\n            \"max_qty_percent_short\": 30,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 0.006,\n            \"wallet_exposure_limit_short\": 0.001,\n            \"levels\": 4,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": true,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 30.0,\n            \"upnl_auto_reduce_threshold_short\": 30.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.07,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n          \"name\": \"bybit\",\n          \"account_name\": \"account_1\",\n          \"symbols_allowed\": 20\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        },\n        {\n          \"name\": \"bitget\",\n          \"account_name\": \"account_4\",\n          \"symbols_allowed\": 5\n      }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n

    This configuration utilizes machine learning-based signals and implements a grid with proper DCA (Dollar Cost Averaging) to ensure each grid level meaningfully adjusts the position to the current market price.

    "},{"location":"strategies/#long-only-grid-targeting-one-symbol-or-more-via-whitelist-and-target_coins_mode","title":"Long only grid targeting one symbol or more via whitelist and target_coins_mode","text":"
    {\n    \"api\": {\n        \"filename\": \"quantdatav2_bybit.json\",\n        \"mode\": \"remote\",\n        \"url\": \"https://api.quantumvoid.org/volumedata/\",\n        \"data_source_exchange\": \"bybit\"\n    },\n    \"bot\": {\n        \"bot_name\": \"your_bot_name\",\n        \"volume_check\": false,\n        \"min_distance\": 0.15,\n        \"min_volume\": 10000,\n        \"upnl_profit_pct\": 0.0024,\n        \"max_upnl_profit_pct\": 0.0029,\n        \"auto_reduce_enabled\": false,\n        \"auto_reduce_start_pct\": 0.068,\n        \"entry_during_autoreduce\": false,\n        \"stoploss_enabled\": false,\n        \"stoploss_upnl_pct\": 0.05,\n        \"liq_stoploss_enabled\": false,\n        \"liq_price_stop_pct\": 0.50,\n        \"percentile_auto_reduce_enabled\": false,\n        \"upnl_threshold_pct\": 0.50,\n        \"max_pos_balance_pct\": 0.50,\n        \"auto_reduce_wallet_exposure_pct\": 0.20,\n        \"auto_reduce_maxloss_pct\": 0.30,\n        \"auto_reduce_marginbased_enabled\": false,\n        \"hedge_ratio\": 0.10,\n        \"hedge_price_difference_threshold\": 0.10,\n        \"test_orders_enabled\": false,\n        \"max_usd_value\": 1000,\n        \"min_qty_threshold\": 0,\n        \"long_liq_pct\": 0.05,\n        \"short_liq_pct\": 0.05,\n        \"MaxAbsFundingRate\": 0.0002,\n        \"blacklist\": [\"BTCUSDT\", \"ETHUSDT\"],\n        \"whitelist\": [\"SOLUSDT\"],\n        \"dashboard_enabled\": true,\n        \"shared_data_path\": \"data/\",\n        \"linear_grid\": {\n            \"grid_behavior\": \"dbscanalgo\",\n            \"drawdown_behavior\": \"full_distribution\",\n            \"target_coins_mode\": true,\n            \"auto_graceful_stop\": false,\n            \"entry_signal_type\": \"lorentzian\",\n            \"additional_entries_from_signal\": true,\n            \"graceful_stop_long\": false,\n            \"graceful_stop_short\": false,\n            \"max_qty_percent_long\": 10000,\n            \"max_qty_percent_short\": 10000,\n            \"auto_reduce_cooldown_enabled\": false,\n            \"auto_reduce_cooldown_start_pct\": 0.051,\n            \"wallet_exposure_limit_long\": 5.0,\n            \"wallet_exposure_limit_short\": 0.001,\n            \"levels\": 5,\n            \"strength\": 1.4,\n            \"outer_price_distance\": 0.059,\n            \"min_outer_price_distance\": 0.019,\n            \"max_outer_price_distance\": 0.049,\n            \"long_mode\": true,\n            \"short_mode\": false,\n            \"reissue_threshold\": 0.001,\n            \"buffer_percentage\": 0.10,\n            \"initial_entry_buffer_pct\": 0.0001,\n            \"min_buffer_percentage\": 0.0035,\n            \"max_buffer_percentage\": 0.010,\n            \"enforce_full_grid\": true,\n            \"min_buffer_percentage_ar\": 0.002,\n            \"max_buffer_percentage_ar\": 0.004,\n            \"upnl_auto_reduce_threshold_long\": 10.0,\n            \"upnl_auto_reduce_threshold_short\": 10.0,\n            \"failsafe_enabled\": false,\n            \"failsafe_start_pct\": 0.05,\n            \"long_failsafe_upnl_pct\": 10.0,\n            \"short_failsafe_upnl_pct\": 10.0\n        },\n        \"hotkeys\": {\n            \"hotkeys_enabled\": false,\n            \"enter_long\": \"1\",\n            \"take_profit_long\": \"2\",\n            \"enter_short\": \"3\",\n            \"take_profit_short\": \"4\"\n        }\n    },\n    \"exchanges\": [\n        {\n            \"name\": \"bybit\",\n            \"account_name\": \"account_1\",\n            \"symbols_allowed\": 2\n        },\n        {\n            \"name\": \"bybit_spot\",\n            \"account_name\": \"account_2\",\n            \"symbols_allowed\": 5\n        },\n        {\n            \"name\": \"bybit_unified\",\n            \"account_name\": \"account_3\",\n            \"symbols_allowed\": 5\n        }\n    ],\n    \"logger\": {\n        \"level\": \"info\"\n    },\n    \"messengers\": {\n        \"discord\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"discord\",\n            \"webhook_url\": \"https://discord.com/api/webhooks/your_webhook_id/your_webhook_token\"\n        },\n        \"telegram\": {\n            \"active\": false,\n            \"embedded_messages\": true,\n            \"messenger_type\": \"telegram\",\n            \"bot_token\": \"your_bot_token\",\n            \"chat_id\": \"your_chat_id\"\n        }\n    }\n  }\n

    This configuration utilizes machine learning-based signals and implements a grid with proper DCA (Dollar Cost Averaging) to ensure each grid level meaningfully adjusts the position to the current market price, while fully utilizing the allowed wallet exposure based amount of total_equity based on wallet_exposure_limit_long and wallet_exposure_limit_short

    "},{"location":"usage/","title":"Usage","text":"

    This guide will help you run the Directional Scalper bot using various command-line instructions. Ensure you have properly configured your config.json and account.json files before proceeding.

    "},{"location":"usage/#running-the-bot","title":"Running the Bot","text":""},{"location":"usage/#easy-update-configuration-file-with-latest-parameters","title":"Easy update configuration file with latest parameters","text":"
    pip3.11 install -r requirements.txt && python3.11 update_config.py --config configs/config.json && mv configs/config.json.new configs/config.json\n
    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json\n
    "},{"location":"usage/#displaying-the-menu-and-selecting-a-strategy","title":"Displaying the Menu and Selecting a Strategy","text":"

    To display the menu and select a strategy, use the following command:

    python3.11 multi_bot_aio.py --config configs/config.json\n

    or

    python3.11 multi_bot_aio.py --config configs/config.json\n
    "},{"location":"usage/#running-the-bot-with-command-line-parameters","title":"Running the Bot with Command Line Parameters","text":"

    You can also run the bot directly with specific command-line parameters. Below are examples of different strategies you can use:

    "},{"location":"usage/#multi-bot-auto-symbol-rotator-strategy","title":"Multi-Bot Auto Symbol Rotator Strategy","text":"

    To run the multi-bot auto symbol rotator strategy, use the following command:

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json\n
    "},{"location":"usage/#old-single-coin-strategy","title":"Old Single Coin Strategy","text":"

    To run the old single coin strategy, use the following command: (likely very outdated, but can be updated by anyone or per request)

    python3.11 bot.py --exchange bybit --symbol DOGEUSDT --strategy qstrendob --config configs/config.json\n
    "},{"location":"usage/#command-line-parameters","title":"Command Line Parameters","text":""},{"location":"usage/#general-parameters","title":"General Parameters","text":"
    • --exchange: Specifies the exchange to use (e.g., bybit, binance).
    • --account_name: Specifies the account name as defined in your account.json.
    • --strategy: Specifies the trading strategy to use (e.g., qsgridob, qstrendob).
    • --config: Specifies the path to your config.json file.
    "},{"location":"usage/#example-commands","title":"Example Commands","text":"
    1. Running the Multi-Bot Auto Symbol Rotator Strategy for Bybit:

    python3.11 multi_bot_aio.py --exchange bybit --account_name account_1 --strategy qsgridob --config configs/config.json

    1. Running the Old Single Coin Strategy for DOGEUSDT on Bybit:

    python3.11 bot.py --exchange bybit --symbol DOGEUSDT --strategy qstrendob --config configs/config.json

    "},{"location":"usage/#additional-notes","title":"Additional Notes","text":"
    • Make sure to adjust the leverage, risk management, and other parameters in your config.json to suit your trading preferences.
    • For advanced usage and more strategies, refer to the Configuration and Strategies sections of the documentation.

    This guide provides a straightforward approach to running the Directional Scalper bot with various strategies and configurations. If you encounter any issues, refer to the relevant sections of the documentation for more details.

    "}]} \ No newline at end of file diff --git a/sitemap.xml.gz b/sitemap.xml.gz index 499b827af7036d87eb16c700eb9d8b8015df99b9..a78bc3dd5b3e02ba111db9a7bcbf2e195d96c7f0 100644 GIT binary patch delta 13 Ucmb=gXP58h;9%Hwej