Skip to content
This repository has been archived by the owner on Jun 8, 2023. It is now read-only.

Commit

Permalink
MoniGoMani v0.5.0 - Upward/Downward/Sideways Trend Detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Rikj000 committed Mar 27, 2021
1 parent b9646d0 commit d9f4eed
Show file tree
Hide file tree
Showing 15 changed files with 1,247 additions and 700 deletions.
52 changes: 40 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,35 @@
# **Current `MoniGoMani` status @ `v0.4.1`** with:
- Configurable & HyperOptable Buy/Sell Signal Weight Influence Tables
- Configurable & HyperOptable Total Buy/Sell Signal Percentages
```
####################################################################################
#### ####
### MoniGoMani v0.5.0 by Rikj000 ###
## ---------------------------- ##
# Isn't that what we all want? Our money to go many? #
# Well that's what this Freqtrade strategy hopes to do for you! #
## By giving you/HyperOpt a lot of signals to alter the weight from ##
### ------------------------------------------------------ ###
## Big thank you to xmatthias and everyone who helped on Freqtrade, ##
## Freqtrade Discord support was also really helpful so thank you too! ##
### ------------------------------------------------------- ###
## Disclaimer: This strategy is under development. ##
# I do not recommend running it live until further development/testing. #
## TEST IT BEFORE USING IT! ##
### ▄▄█▀▀▀▀▀█▄▄ ###
## ------------------------------------- ▄█▀ ▄ ▄ ▀█▄ ##
### If you like my work, feel free to donate or use one of █ ▀█▀▀▀▀▄ █ ###
## my referral links, that would also greatly be appreciated █ █▄▄▄▄▀ █ ##
# ICONOMI: https://www.iconomi.com/register?ref=JdFzz █ █ █ █ #
## Binance: https://www.binance.com/en/register?ref=97611461 ▀█▄ ▀▀█▀█▀ ▄█▀ ##
### BTC: 19LL2LCMZo4bHJgy15q1Z1bfe7mV4bfoWK ▀▀█▄▄▄▄▄█▀▀ ###
#### ####
####################################################################################
```

# **Current `MoniGoMani` status @ `v0.5.0`** with:
- Configurable & HyperOptable Buy/Sell Signal Weight Influence Tables for Upward/Downward trends
- Configurable & HyperOptable Total Buy/Sell Signal Percentages for Upward/Downward trends
- Turn On/Off Weighted Signals for easy debugging/better speed
- 10 Buy & 10 Sell signals implemented:
- ADX + Up/Down
- Up/Down
- Each table has 9 Buy & 9 Sell signals implemented each Configurable & HyperOptable:
- ADX + Strong Up/Strong Down
- RSI
- MACD
- SMA Short Death/Golden Cross
Expand All @@ -13,21 +38,24 @@
- EMA Long Death/Golden Cross
- Bollinger Band Re-Entrance
- VWAP Cross
- Main/Sub Plot Configurations for all indicators used (Handy for FreqUI but requires Docker `freqtrade:develop_plot` & `technical` dependencies)

### **Changelog / Backtest Results**:
### **Changelog / Backtest Results**:
*(Testing rough 2 week -4.83% market time period, default coin pairs, 75% Total Buy, 25% Total Sell)*
- v0.0.1 (20-03-2021 - Weight Table, RSI) -15% profit...
- v0.1.0 (21-03-2021 - Buy/Sell Weight Table, Total Buy/Sell Signal %, ADX, Up/Down, MACD) -8% profit..
- v0.2.0 (22-03-2021 - SMA Death/Golden Cross, BugFixed Signals) -0.29% profit!
- v0.2.1 (23-03-2021 - Refactored to SMA Long Death/Golden Cross + EMA Long Death/Golden Cross) **1.15% profit!**
- v0.2.1 (23-03-2021 - Refactored to SMA Long Death/Golden Cross + EMA Long Death/Golden Cross) **1.15% profit!** :partying_face:
- v0.2.2 (23-03-2021 - SMA and EMA Short Death/Golden Cross) 1.15% profit
- v0.2.3 (24-03-2021 - Bollinger Band Re-Entrance afer upward/downward breakout) 1.16% profit
- v0.3.0 (24-03-2021 - 0 weight = No Weighted Signal DataFrame entry)
- v0.3.1 (24-03-2021 - Turn On/Off all Weighted Signal DataFrame entries with a true/false)
- v0.3.2 (24-03-2021 - VWAP Cross) 1.24% profit
- v0.4.0 (25-03-2021 - Added HyperOpt for Weight Tables) **62.88% profit** (HyperOpt Result..)
- v0.4.1 (25-03-2021 - HyperOpt Params Real -> Integer, SortinoHyperOptLossDaily) **1322.78% profit - 124.6** (2 month HyperOpt Result, Mid Januari - Mid March)
- v0.4.1 (25-03-2021 - HyperOpt Params Real -> Integer, SortinoHyperOptLossDaily) **1322.78% profit** :sunglasses: :chart_with_upwards_trend: (2 month HyperOpt Result, Mid Januari - Mid March)
- v0.4.2 (27-03-2021 - Main/Sub Plot Configurations for all indicators used)
- v0.5.0 (27-03-2021 - Rewrote Weight tables for Upward/Downward trends, Upward/Downward/Sideways trend detection & Auto table allocation or wait if sideways, Scrapped 0 weight = No Weighted Signal DataFrame entry, Scrapped the configurable Up/Down signals) **2,568.61% profit!** :money_mouth:

### **Planned / Ideas:**
- Upward / Downward / Straight trend specific strats?
- Other/Better indicators?
### **Planned**:
- Weighted Tables for SideWays movement
- Other/Better indicators?
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
INFO - Loading data from 2020-12-15 08:00:00 up to 2021-03-16 00:00:00 (90 days)..
INFO - Hyperopting with data from 2021-01-01 00:00:00 up to 2021-03-16 00:00:00 (74 days)..
INFO - Found 12 CPU cores. Let's make them scream!
INFO - Number of parallel jobs set as: -1
INFO - Min roi table: {0: 0.06883, 120: 0.04589, 240: 0.02294, 360: 0}
INFO - Max roi table: {0: 0.71124, 480: 0.25238, 1200: 0.09177, 2640: 0}
INFO - Effective number of parallel workers used: 12
+--------+-----------+----------+------------------+--------------+------------------------------+----------------+-------------+
| Best | Epoch | Trades | Win Draw Loss | Avg profit | Profit | Avg duration | Objective |
|--------+-----------+----------+------------------+--------------+------------------------------+----------------+-------------|
| * Best | 1/1000 | 398 | 182 29 187 | 0.20% | 0.00078502 BTC (78.44%) | 1,045.3 m | -1.04197 |
| * Best | 2/1000 | 483 | 148 82 253 | 0.90% | 0.00435364 BTC (434.93%) | 1,365.1 m | -9.33364 |
| * Best | 10/1000 | 746 | 314 65 367 | 1.22% | 0.00914215 BTC (913.30%) | 1,229.1 m | -15.0941 |
| Best | 61/1000 | 494 | 239 115 140 | 2.14% | 0.01059791 BTC (1,058.73%) | 2,245.4 m | -16.206 |
| Best | 64/1000 | 434 | 311 61 62 | 4.48% | 0.01945447 BTC (1,943.50%) | 3,394.0 m | -18.2663 |
| Best | 73/1000 | 644 | 345 155 144 | 2.79% | 0.01799898 BTC (1,798.10%) | 2,023.8 m | -20.9383 |
| Best | 74/1000 | 946 | 504 36 406 | 1.80% | 0.01706008 BTC (1,704.31%) | 899.2 m | -25.095 |
| Best | 88/1000 | 820 | 320 42 458 | 1.58% | 0.01299792 BTC (1,298.49%) | 626.4 m | -27.282 |
| Best | 98/1000 | 1352 | 439 39 874 | 0.98% | 0.01323958 BTC (1,322.68%) | 287.8 m | -32.9641 |
| Best | 104/1000 | 1633 | 1175 49 409 | 1.37% | 0.02240322 BTC (2,238.08%) | 613.2 m | -40.1503 |
| Best | 200/1000 | 1245 | 783 20 442 | 1.25% | 0.01561435 BTC (1,559.88%) | 291.8 m | -40.5808 |
| Best | 259/1000 | 2021 | 1550 39 432 | 1.09% | 0.02212395 BTC (2,210.17%) | 454.1 m | -41.0635 |
| Best | 266/1000 | 2148 | 1812 32 304 | 1.14% | 0.02451695 BTC (2,449.25%) | 373.9 m | -44.3484 |
| Best | 454/1000 | 1919 | 982 2 935 | 0.85% | 0.01624475 BTC (1,622.86%) | 102.5 m | -44.9014 |
| Best | 548/1000 | 3448 | 2332 4 1112 | 0.74% | 0.02571658 BTC (2,568.61%) | 72.2 m | -58.4164 |

INFO - 1000 epochs saved to '/mnt/Windows/Users/Rik/Desktop/Rikj-Home/Projects/Freqtrade-Git/user_data/hyperopt_results/strategy_MoniGoMani_hyperopt_results_2021-03-27_20-05-46.pickle'.

Best result:

548/1000:
3448 trades. 2332/4/1112
Wins/Draws/Losses.
Avg profit 0.74%.
Median profit 0.59%.
Total profit 0.02571658 BTC ( 2568.61Σ%).
Avg duration 72.2 min.
Objective: -58.41645


# Buy hyperspace params:
buy_params = {
'_downward_trend_total_buy_signal_needed': 95,
'_upward_trend_total_buy_signal_needed': 47,
'downward_trend_adx_strong_up_buy_weight': 37,
'downward_trend_bollinger_bands_buy_weight': 54,
'downward_trend_ema_long_golden_cross_buy_weight': 85,
'downward_trend_ema_short_golden_cross_buy_weight': 84,
'downward_trend_macd_buy_weight': 23,
'downward_trend_rsi_buy_weight': 80,
'downward_trend_sma_long_golden_cross_buy_weight': 83,
'downward_trend_sma_short_golden_cross_buy_weight': 81,
'downward_trend_vwap_cross_buy_weight': 94,
'upward_trend_adx_strong_up_buy_weight': 20,
'upward_trend_bollinger_bands_buy_weight': 20,
'upward_trend_ema_long_golden_cross_buy_weight': 37,
'upward_trend_ema_short_golden_cross_buy_weight': 94,
'upward_trend_macd_buy_weight': 98,
'upward_trend_rsi_buy_weight': 17,
'upward_trend_sma_long_golden_cross_buy_weight': 29,
'upward_trend_sma_short_golden_cross_buy_weight': 10,
'upward_trend_vwap_cross_buy_weight': 51
}

# Sell hyperspace params:
sell_params = {
'_downward_trend_total_sell_signal_needed': 38,
'_upward_trend_total_sell_signal_needed': 79,
'downward_trend_adx_strong_down_sell_weight': 72,
'downward_trend_bollinger_bands_sell_weight': 3,
'downward_trend_ema_long_death_cross_sell_weight': 92,
'downward_trend_ema_short_death_cross_sell_weight': 13,
'downward_trend_macd_sell_weight': 36,
'downward_trend_rsi_sell_weight': 53,
'downward_trend_sma_long_death_cross_sell_weight': 87,
'downward_trend_sma_short_death_cross_sell_weight': 33,
'downward_trend_vwap_cross_sell_weight': 66,
'upward_trend_adx_strong_down_sell_weight': 4,
'upward_trend_bollinger_bands_sell_weight': 19,
'upward_trend_ema_long_death_cross_sell_weight': 34,
'upward_trend_ema_short_death_cross_sell_weight': 59,
'upward_trend_macd_sell_weight': 50,
'upward_trend_rsi_sell_weight': 5,
'upward_trend_sma_long_death_cross_sell_weight': 62,
'upward_trend_sma_short_death_cross_sell_weight': 84,
'upward_trend_vwap_cross_sell_weight': 67
}

# ROI table:
minimal_roi = {
"0": 0.49718,
"351": 0.17781,
"828": 0.06013,
"1604": 0
}

# Stoploss:
stoploss = -0.02655

# Trailing stop:
trailing_stop = True
trailing_stop_positive = 0.01011
trailing_stop_positive_offset = 0.01131
trailing_only_offset_is_reached = True

29 changes: 29 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
version: '3'
services:
freqtrade:
# image: freqtradeorg/freqtrade:stable
# image: freqtradeorg/freqtrade:develop
# Use plotting image
image: freqtradeorg/freqtrade:develop_plot
# Build step - only needed when additional dependencies are needed
build:
context: .
dockerfile: "./docker/Dockerfile.technical"
restart: unless-stopped
container_name: freqtrade
volumes:
- "/etc/localtime:/etc/localtime:ro"
- "./user_data:/freqtrade/user_data"
# Expose api on port 8080 (localhost only)
# Please read the https://www.freqtrade.io/en/latest/rest-api/ documentation
# before enabling this.
ports:
- "127.0.0.1:8080:8080"
# Default command used when running `docker compose up`
command: >
trade
--logfile /freqtrade/user_data/logs/freqtrade.log
--db-url sqlite:////freqtrade/user_data/tradesv3-MoniGoMani_v0.5.0_HyperOpted.sqlite
--config /freqtrade/user_data/config.json
--strategy MoniGoManiHyperOpted
10 changes: 10 additions & 0 deletions docker/Dockerfile.develop
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM freqtradeorg/freqtrade:develop

# Install dependencies
COPY requirements-dev.txt /freqtrade/

RUN pip install numpy --no-cache-dir \
&& pip install -r requirements-dev.txt --no-cache-dir

# Empty the ENTRYPOINT to allow all commands
ENTRYPOINT []
7 changes: 7 additions & 0 deletions docker/Dockerfile.jupyter
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
FROM freqtradeorg/freqtrade:develop_plot


RUN pip install jupyterlab --no-cache-dir

# Empty the ENTRYPOINT to allow all commands
ENTRYPOINT []
7 changes: 7 additions & 0 deletions docker/Dockerfile.plot
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
ARG sourceimage=develop
FROM freqtradeorg/freqtrade:${sourceimage}

# Install dependencies
COPY requirements-plot.txt /freqtrade/

RUN pip install -r requirements-plot.txt --no-cache-dir
6 changes: 6 additions & 0 deletions docker/Dockerfile.technical
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FROM freqtradeorg/freqtrade:develop

RUN apt-get update \
&& apt-get -y install git \
&& apt-get clean \
&& pip install git+https://github.com/freqtrade/technical
16 changes: 16 additions & 0 deletions docker/docker-compose-jupyter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
version: '3'
services:
ft_jupyterlab:
build:
context: ..
dockerfile: docker/Dockerfile.jupyter
restart: unless-stopped
container_name: freqtrade
ports:
- "127.0.0.1:8888:8888"
volumes:
- "./user_data:/freqtrade/user_data"
# Default command used when running `docker compose up`
command: >
jupyter lab --port=8888 --ip 0.0.0.0 --allow-root
2 changes: 1 addition & 1 deletion user_data/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"use_order_book": true,
"order_book_top": 1,
"check_depth_of_market": {
"enabled": true,
"enabled": false,
"bids_to_ask_delta": 0.95
}
},
Expand Down
Loading

0 comments on commit d9f4eed

Please sign in to comment.