Skip to content

Commit

Permalink
Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
donewiththedollar committed Jun 22, 2024
1 parent 64ecd35 commit 03831bd
Show file tree
Hide file tree
Showing 64 changed files with 209 additions and 0 deletions.
File renamed without changes.
90 changes: 90 additions & 0 deletions docs/configuration.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# Configuration

## Account Section

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

### Parameters:

- **api_key**: Your exchange API key.
- **api_secret**: Your exchange API secret.
- **account_name**: A name to identify your account configuration.

## Bot Section

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

### Linear Grid Strategy Parameters

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.

### Example Configuration Snippet

```json
{
"account": {
"api_key": "your_api_key",
"api_secret": "your_api_secret",
"account_name": "account_1"
},
"bot": {
"linear_grid": {
"max_qty_percent_long": 50,
"max_qty_percent_short": 50,
"auto_reduce_cooldown_enabled": true,
"auto_reduce_cooldown_start_pct": 10,
"wallet_exposure_limit_long": 30,
"wallet_exposure_limit_short": 30,
"levels": 10,
"strength": 2,
"outer_price_distance": 5,
"min_outer_price_distance": 2,
"max_outer_price_distance": 10,
"long_mode": true,
"short_mode": true,
"reissue_threshold": 5,
"buffer_percentage": 1,
"initial_entry_buffer_pct": 0.5,
"min_buffer_percentage": 0.2,
"max_buffer_percentage": 2,
"enforce_full_grid": true,
"min_buffer_percentage_ar": 0.2,
"max_buffer_percentage_ar": 2,
"upnl_auto_reduce_threshold_long": 10,
"upnl_auto_reduce_threshold_short": 10,
"failsafe_enabled": true,
"failsafe_start_pct": 50,
"long_failsafe_upnl_pct": -20,
"short_failsafe_upnl_pct": -20
}
}
}
```
Empty file added docs/docker.md
Empty file.
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Directional Scalper

Welcome to the documentation for Directional Scalper.
95 changes: 95 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Installation

## Prerequisites

Before you begin, ensure you have the following prerequisites:

- Python 3.11+
- pip

## Quickstart

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. Add your API key(s) to the `config.json` file located in the `/configs` folder.

4. Run the bot:
- To display the menu and select a strategy, use the following command:
```
python3.11 multi_bot_signalscreener.py --config config.json
```
or
```
python3.11 multi_bot.py --config config.json
```
- Alternatively, you can run the bot with command line parameters:
- For the multi-bot auto symbol rotator strategy:
```
python3.11 multi_bot_signalscreener_multicore.py --exchange bybit --account_name account_1 --strategy qsgridob --config config.json
```
- For the old single coin strategy:
```
python3.11 bot.py --exchange bybit --symbol DOGEUSDT --strategy qstrendob --config config.json
```
## 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. 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.
Empty file added docs/strategies.md
Empty file.
Empty file added docs/telegram_alerts.md
Empty file.
Empty file added docs/usage.md
Empty file.
21 changes: 21 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
site_name: Directional Scalper Documentation
theme:
name: material
features:
- navigation.tabs
- navigation.sections
palette:
primary: 'indigo'
accent: 'indigo'
font:
text: 'Roboto'
code: 'Roboto Mono'
nav:
- Home: index.md
- Installation: installation.md
- Usage: usage.md
- Configuration: configuration.md
- Strategies: strategies.md
- API Reference: api_reference.md
- Docker: docker.md
- Telegram Alerts: telegram_alerts.md
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 03831bd

Please sign in to comment.