bbgo_origin/config/pivotshort-ETHUSDT.yaml

86 lines
2.9 KiB
YAML

---
sessions:
binance:
exchange: binance
envVarPrefix: binance
margin: true
# isolatedMargin: true
# isolatedMarginSymbol: ETHUSDT
exchangeStrategies:
- on: binance
pivotshort:
symbol: ETHUSDT
interval: 5m
pivotLength: 200
# breakLow settings are used for shorting when the current price break the previous low
breakLow:
# ratio is how much the price breaks the previous low to trigger the short.
ratio: 0.1%
# quantity is used for submitting the sell order
# if quantity is not set, all base balance will be used for selling the short.
quantity: 10.0
# marketOrder submits the market sell order when the closed price is lower than the previous pivot low.
marketOrder: true
# bounceRatio is used for calculating the price of the limit sell order.
# it's ratio of pivot low bounce when a new pivot low is detected.
# Sometimes when the price breaks the previous low, the price might be pulled back to a higher price.
# The bounceRatio is useful for such case, however, you might also miss the chance to short at the price if there is no pull back.
# Notice: When marketOrder is set, bounceRatio will not be used.
# bounceRatio: 0.1%
# stopEMARange is the price range we allow short.
# Short-allowed price range = [current price] > [EMA] * (1 - [stopEMARange])
stopEMARange: 0%
stopEMA:
interval: 1h
window: 99
bounceShort:
quantity: 10.0
# stopLossPercentage: 1%
numOfLayers: 10
layerSpread: 0.1%
pivotRatio: 0.1%
exit:
# roiStopLossPercentage is the stop loss percentage of the position ROI (currently the price change)
roiStopLossPercentage: 1%
# roiTakeProfitPercentage is used to force taking profit by percentage of the position ROI (currently the price change)
# force to take the profit ROI exceeded the percentage.
roiTakeProfitPercentage: 10%
# roiMinTakeProfitPercentage applies to lowerShadowRatio and cumulatedVolume exit options
roiMinTakeProfitPercentage: 10%
# lowerShadowRatio is used to taking profit when the (lower shadow height / low price) > lowerShadowRatio
# you can grab a simple stats by the following SQL:
# SELECT ((close - low) / close) AS shadow_ratio FROM binance_klines WHERE symbol = 'ETHUSDT' AND `interval` = '5m' AND start_time > '2022-01-01' ORDER BY shadow_ratio DESC LIMIT 20;
lowerShadowRatio: 3%
# cumulatedVolume is used to take profit when the cumulated quote volume from the klines exceeded a threshold
cumulatedVolume:
enabled: true
minQuoteVolume: 90_000_000
window: 5
marginOrderSideEffect: repay
backtest:
sessions:
- binance
startTime: "2022-01-01"
endTime: "2022-06-08"
symbols:
- ETHUSDT
accounts:
binance:
balances:
ETH: 10.0
USDT: 3000.0