Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Commit

Permalink
update change log and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Rodriguez committed May 26, 2017
1 parent 3e6af2f commit ef56d8d
Showing 1 changed file with 21 additions and 19 deletions.
40 changes: 21 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ Zenbot is a command-line cryptocurrency trading bot using Node.js and MongoDB. I

- Zenbot is NOT a sure-fire profit machine. Use it AT YOUR OWN RISK.
- Crypto-currency is still an experiment, and therefore so is Zenbot. Meaning, both may fail at any time.
- Running a bot, and trading in general requires careful study of the risks and parameters involved.
- Running a bot, and trading in general requires careful study of the risks and parameters involved. A wrong setting can cause you a major loss.
- Never leave the bot un-monitored for long periods of time. Zenbot doesn't know when to stop, so be prepared to stop it if too much loss occurs.
- Often times the default trade parameters will underperform vs. a buy-hold strategy, so run some simulations and find the optimal parameters for your chosen exchange/pair before going "all-in".

## Quick-start
Expand Down Expand Up @@ -221,16 +222,12 @@ trend_ema (default)
description:
Buy when (EMA - last(EMA) > 0) and sell when (EMA - last(EMA) < 0). Optional buy on low RSI.
options:
--period=<value> period length (default: 1h)
--min_periods=<value> min. number of history periods (default: 36)
--trend_ema=<value> number of periods for trend EMA (default: 34)
--buy_rate=<value> buy if trend EMA rate between neutral_rate and this positive float (default: 0)
--sell_rate=<value> sell if trend EMA rate between neutral_rate * -1 and this negative float (default: 0)
--neutral_rate=<value> avoid signals when trend EMA rate is under this absolute value (default: auto)
--max_buy_duration=<value> avoid buy if trend duration over this number (default: 0)
--max_sell_duration=<value> avoid sell if trend duration over this number (default: 0)
--oversold_rsi_periods=<value> number of periods for oversold RSI (default: 14)
--oversold_rsi=<value> buy when RSI reaches this value (default: 0)
--period=<value> period length (default: 20m)
--min_periods=<value> min. number of history periods (default: 52)
--trend_ema=<value> number of periods for trend EMA (default: 30)
--neutral_rate=<value> avoid trades if abs(trend_ema) under this float (0 to disable, "auto" for a variable filter) (default: 0)
--oversold_rsi_periods=<value> number of periods for oversold RSI (default: 25)
--oversold_rsi=<value> buy when RSI reaches this value (default: 30)
```

### Reading the console output
Expand All @@ -254,8 +251,8 @@ From left to right:
### About the default strategy

- The default strategy is called `trend_ema` and resides at `./extensions/trend_ema`.
- Defaults to using a 1h period, but you can override this with adding e.g. `--period=15m` to the `sim` or `trade` commands.
- Computes the 34-period EMA of the current price, and calculates the percent change from the last period's EMA to get the `trend_ema_rate`
- Defaults to using a 20m period, but you can override this with adding e.g. `--period=5m` to the `sim` or `trade` commands.
- Computes the 30-period EMA of the current price, and calculates the percent change from the last period's EMA to get the `trend_ema_rate`
- Considers `trend_ema_rate >= 0` an upwards trend and `trend_ema_rate < 0` a downwards trend
- Filters out low values (whipsaws) by `neutral_rate`, which when set to `auto`, uses the standard deviation of the `trend_ema_rate` as a variable noise filter.
- Buys at the beginning of upwards trend, sells at the beginning of downwards trend
Expand All @@ -264,12 +261,11 @@ From left to right:

### Option tweaking tips

- Trade frequency is adjusted with a combination of `--period` and `--trend_ema`. For example, if you want more frequent trading, try `--period=15m` or `--trend_ema=25` or both. If you get too many ping-pong trades or losses from fees, try increasing `period` or `trend_ema`.
- Trade frequency is adjusted with a combination of `--period` and `--trend_ema`. For example, if you want more frequent trading, try `--period=5m` or `--trend_ema=20` or both. If you get too many ping-pong trades or losses from fees, try increasing `period` or `trend_ema`.
- Sometimes it's tempting to tell the bot trade very often. Try to resist this urge, and go for quality over quantity, since each trade comes with a decent amount of slippage and whipsaw risk.
- In a bull market, `--sell_rate=-0.01` and `--max_sell_duration=8` can give the price a chance to recover before selling. If there is a sudden dive in price, it's assumed it will recover and sell is delayed. Compensate for the risk by using `--sell_stop_pct=5`.
- In a bull market with regular price dives and recoveries, `--oversold_rsi=25` will try to buy when the price dives.
- In a market with predictable price surges and corrections, `--profit_stop_enable_pct=10` will try to sell when the last buy hits 10% profit and then drops to 9%.
- as of v4.0.2, `--neutral_rate=auto` is on by default, which [proved in simulations](https://gist.github.com/carlos8f/429443d7d6b90c7daa1eb986ac7aa8cf) to be effective at preventing weak (whipsaw) signals. However, sometimes `--neutral_rate=0` works better for low volatility, such as BTC-USD at 1h.
- `--oversold_rsi=<rsi>` will try to buy when the price dives. This is one of the ways to get profit above buy/hold, but setting it too high might result in a loss of the price continues to fall.
- In a market with predictable price surges and corrections, `--profit_stop_enable_pct=10` will try to sell when the last buy hits 10% profit and then drops to 9% (the drop % is set with `--profit_stop_pct`). However in strong, long uptrends this option may end up causing a sell too early.
- As of v4.0.5, the `--neutral_rate=auto` filter is disabled, which is currently producing better results with the new default 20m period. Some coins may benefit from `--neutral_rate=auto` though, try simulating with and without it.

## Manual trade tools

Expand Down Expand Up @@ -300,7 +296,13 @@ zenbot sell gdax.BTC-USD --pct=10

## Update Log

- [v4.0.4](https://github.com/carlos8f/zenbot/releases/tag/v4.0.4) (Latest)
- [v4.0.5](https://github.com/carlos8f/zenbot/releases/tag/v4.0.5) (Latest)
- handle insufficient funds errors from gdax
- new trend_ema defaults adjusted for latest btc movements: 20m period, neutral_rate=0
- include more data in sim output
- remove rarely useful trend_ema options
- avoid abort in trader on failed getTrades()
- v4.0.4
- debugging for polo odd results
- sim: simplify and correct makerFee assessment
- fix conf path in API credentials errors
Expand Down

0 comments on commit ef56d8d

Please sign in to comment.