Skip to content

Commit

Permalink
Merge pull request #56 from username-anthony-is-not-available/combine…
Browse files Browse the repository at this point in the history
…d_rsi_bollinger_strategy

Genius Yield’s Trading Strategies Competition - Combined rsi bollinger strategy
  • Loading branch information
4TT1L4 authored Aug 4, 2024
2 parents 1b03bde + cb8bb9d commit e4619c9
Show file tree
Hide file tree
Showing 4 changed files with 459 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ ENV PYTHONUNBUFFERED=1

WORKDIR /app

# Install dependencies
RUN apt-get update && apt-get install -y \
dos2unix \
--no-install-recommends

# Create a non-privileged user that the app will run under.
# See https://docs.docker.com/go/dockerfile-user-best-practices/
ARG UID=10001
Expand Down Expand Up @@ -40,6 +45,7 @@ COPY .flaskenv .

# Copy the bash scripts into the container.
COPY *.sh .
RUN dos2unix *.sh
RUN chmod +x *.sh

RUN /bin/bash -c /app/generate_client.sh
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ start-bb:
docker compose up -d --build bollinger_bands_strategy
docker compose logs -f bollinger_bands_strategy

start-crbs:
docker compose up -d --build combined_rsi_bollinger_strategy
docker compose logs -f combined_rsi_bollinger_strategy

server-logs:
docker compose logs -f server

Expand Down
25 changes: 25 additions & 0 deletions compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,28 @@ services:
PERIOD: 5
depends_on:
- server
combined_rsi_bollinger_strategy:
build:
context: .
environment:
BACKEND_URL: http://server:8082
SERVER_API_KEY: ${SERVER_API_KEY}
EXECUTION_DELAY: 60 # Time period in seconds to wait between strategy executions
STARTUP_DELAY: 1 # Time period in seconds to wait for the backend to start
RETRY_DELAY: 20 # Time period in seconds to wait before retrying to reach the backend
CONFIRMATION_DELAY: 90
STRATEGY: combined_rsi_bollinger_strategy
CONFIG: |
BASE_ASSET: lovelace
# GENS for MAINNET:
TARGET_ASSET: dda5fdb1002f7389b33e036b6afee82a8189becb6cba852e8b79b4fb.0014df1047454e53
# tGENS for PRERPOD:
# TARGET_ASSET: c6e65ba7878b2f8ea0ad39287d3e2fd256dc5c4160fc19bdf4c4d87e.7447454e53
POSITION_SIZE_LOVELACES: 1000000
RSI_PERIOD: 10 # Shorter period for quicker signals
RSI_OVERBOUGHT: 65 # Lower threshold for overbought
RSI_OVERSOLD: 35 # Higher threshold for oversold
BB_PERIOD: 20 # Standard period
BB_STD_DEV: 1.8 # Tighter bands for volatility
depends_on:
- server
Loading

0 comments on commit e4619c9

Please sign in to comment.