mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-22 14:55:16 +00:00
add doc for CumulatedVolumeTakeProfit
This commit is contained in:
parent
3d4f765678
commit
cfc4fd1f81
|
@ -90,8 +90,8 @@ exchangeStrategies:
|
|||
|
||||
# (5) cumulatedVolumeTakeProfit is used to take profit when the cumulated quote volume from the klines exceeded a threshold
|
||||
- cumulatedVolumeTakeProfit:
|
||||
minQuoteVolume: 50_000_000
|
||||
window: 5
|
||||
minQuoteVolume: 100_000_000
|
||||
window: 2
|
||||
|
||||
backtest:
|
||||
sessions:
|
||||
|
|
|
@ -8,6 +8,13 @@ import (
|
|||
"github.com/c9s/bbgo/pkg/types"
|
||||
)
|
||||
|
||||
// CumulatedVolumeTakeProfit
|
||||
// This exit method cumulate the volume by N bars, if the cumulated volume exceeded a threshold, then we take profit.
|
||||
//
|
||||
// To query the historical quote volume, use the following query:
|
||||
//
|
||||
// > SELECT start_time, `interval`, quote_volume, open, close FROM binance_klines WHERE symbol = 'ETHUSDT' AND `interval` = '5m' ORDER BY quote_volume DESC LIMIT 20;
|
||||
//
|
||||
type CumulatedVolumeTakeProfit struct {
|
||||
types.IntervalWindow
|
||||
Ratio fixedpoint.Value `json:"ratio"`
|
||||
|
|
Loading…
Reference in New Issue
Block a user