Skip to content

Commit

Permalink
doc: support strategy
Browse files Browse the repository at this point in the history
  • Loading branch information
andycheng123 committed Dec 16, 2021
1 parent 5a238b8 commit 634b722
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,8 @@ Check out the strategy directory [strategy](pkg/strategy) for all built-in strat
- `bollgrid` strategy implements a basic grid strategy with the built-in bollinger
indicator [bollgrid](pkg/strategy/bollgrid)
- `grid` strategy implements the fixed price band grid strategy [grid](pkg/strategy/grid)
- `support` strategy implements the fixed price band grid strategy [support](pkg/strategy/support). See
[document](./doc/strategy/support.md).
- `flashcrash` strategy implements a strategy that catches the flashcrash [flashcrash](pkg/strategy/flashcrash)

To run these built-in strategies, just modify the config file to make the configuration suitable for you, for example if
Expand Down
1 change: 1 addition & 0 deletions config/support.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ exchangeStrategies:
symbol: LINKUSDT
interval: 1m
minVolume: 1_000
movingAverageWindow: 99

scaleQuantity:
byVolume:
Expand Down
33 changes: 33 additions & 0 deletions doc/strategy/support.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### Support Strategy

This strategy uses K-lines with high volume as support and buys the target asset, then takes profit at specified price.


#### Parameters

- `symbol`
- The trading pair symbol, e.g., `BTCUSDT`, `ETHUSDT`
- `quantity`
- Quantity per order
- `interval`
- The K-line interval, e.g., `5m`, `1h`
- `minVolume`
- The threshold, e.g., `1000000`, `5000000`. A K-line with volume larger than this is seen as a support, and
triggers a market buy order.
- `movingAverageWindow`
- The MA window to filter out noises, e.g., 99. The support higher than the MA is seen as invalid
- `maxBaseAssetBalance`
- Maximum quantity of the target asset. Orders will not be submitted if the current balance reaches this threshold.
- `minQuoteAssetBalance`
- Minimum quantity of the quote asset. Orders will not be submitted if the current balance reaches this threshold.
- `targets`
- `profitPercentage`
- Take profit ratio, e.g., 0.01 means taking profit when the price rises 1%.
- `quantityPercentage`
- The position ratio to take profit, e.g., 0.5 means selling 50% of the original buy order position when takes
profit.


#### Examples

See [support.yaml](../../config/support.yaml)

0 comments on commit 634b722

Please sign in to comment.