mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-25 00:05:15 +00:00
doc: add pricealert doc
This commit is contained in:
parent
dc8ce96fa9
commit
877d40cdeb
|
@ -126,6 +126,8 @@ bbgo pnl --exchange binance --asset BTC --since "2019-01-01"
|
|||
|
||||
## Advanced Configuration
|
||||
|
||||
### Notification
|
||||
|
||||
- [Setting up Telegram notification](./doc/configuration/telegram.md)
|
||||
- [Setting up Slack notification](./doc/configuration/slack.md)
|
||||
|
||||
|
@ -185,7 +187,8 @@ bbgo sync --session binance
|
|||
|
||||
Check out the strategy directory [strategy](pkg/strategy) for all built-in strategies:
|
||||
|
||||
- `pricealert` strategy demonstrates how to use the notification system [pricealert](pkg/strategy/pricealert)
|
||||
- `pricealert` strategy demonstrates how to use the notification system [pricealert](pkg/strategy/pricealert). See
|
||||
[document](./doc/strategy/pricealert.md).
|
||||
- `xpuremaker` strategy demonstrates how to maintain the orderbook and submit maker
|
||||
orders [xpuremaker](pkg/strategy/xpuremaker)
|
||||
- `buyandhold` strategy demonstrates how to subscribe kline events and submit market
|
||||
|
|
|
@ -24,7 +24,7 @@ TELEGRAM_BOT_AUTH_TOKEN=itsme55667788
|
|||
```
|
||||
|
||||
The alerting strategies use Telegram bot notification without further configuration. You can check the [pricealert
|
||||
yaml file](./config/pricealert-tg.yaml) in the `config/` directory for example.
|
||||
yaml file](../../config/pricealert-tg.yaml) in the `config/` directory for example.
|
||||
|
||||
If you want the order submitting/filling notification, add the following to your `bbgo.yaml`:
|
||||
|
||||
|
|
25
doc/strategy/pricealert.md
Normal file
25
doc/strategy/pricealert.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
### Price Alert Strategy
|
||||
|
||||
This strategy will send notifications to specified channels when the price change of the specified trading pairs is
|
||||
larger than the threshold.
|
||||
|
||||
|
||||
### Prerequisite
|
||||
Setup Telegram/Slack notification before using Price Alert Strategy. See [Setting up Telegram Bot Notification
|
||||
](../configuration/telegram.md) and [Setting up Slack Notification](../configuration/slack.md).
|
||||
|
||||
|
||||
#### Parameters
|
||||
|
||||
- `symbol`
|
||||
- The trading pair symbol, e.g., `BTCUSDT`, `ETHUSDT`
|
||||
- `interval`
|
||||
- The K-line interval, e.g., `5m`, `1h`
|
||||
- `minChange`
|
||||
- Alert threshold, e.g., `100`, `500`. This is a fixed value of price change. Any price change in a single K-line
|
||||
larger than this value will trigger the alert.
|
||||
|
||||
|
||||
#### Examples
|
||||
|
||||
See [pricealert.yaml](../../config/pricealert.yaml) and [pricealert-tg.yaml](../../config/pricealert-tg.yaml)
|
Loading…
Reference in New Issue
Block a user