2022-11-21 05:46:13 +00:00
|
|
|
---
|
|
|
|
persistence:
|
|
|
|
redis:
|
|
|
|
host: 127.0.0.1
|
|
|
|
port: 6379
|
|
|
|
db: 0
|
|
|
|
|
|
|
|
sessions:
|
|
|
|
binance:
|
|
|
|
exchange: binance
|
|
|
|
envVarPrefix: binance
|
|
|
|
margin: true
|
|
|
|
isolatedMargin: true
|
|
|
|
isolatedMarginSymbol: BTCUSDT
|
|
|
|
|
|
|
|
backtest:
|
|
|
|
sessions: [binance]
|
|
|
|
# for testing max draw down (MDD) at 03-12
|
|
|
|
# see here for more details
|
|
|
|
# https://www.investopedia.com/terms/m/maximum-drawdown-mdd.asp
|
2022-11-22 03:35:32 +00:00
|
|
|
startTime: "2022-05-01"
|
|
|
|
endTime: "2022-10-31"
|
2022-11-21 05:46:13 +00:00
|
|
|
symbols:
|
|
|
|
- BTCUSDT
|
|
|
|
accounts:
|
|
|
|
binance:
|
|
|
|
makerCommission: 10 # 0.15%
|
|
|
|
takerCommission: 15 # 0.15%
|
|
|
|
balances:
|
2022-11-23 09:44:40 +00:00
|
|
|
BTC: 2.0
|
2022-11-21 05:46:13 +00:00
|
|
|
USDT: 10000.0
|
|
|
|
|
|
|
|
exchangeStrategies:
|
|
|
|
- on: binance
|
|
|
|
linregmaker:
|
|
|
|
symbol: BTCUSDT
|
|
|
|
|
|
|
|
# interval is how long do you want to update your order price and quantity
|
|
|
|
interval: 1m
|
|
|
|
|
|
|
|
# reverseEMA
|
|
|
|
reverseEMA:
|
|
|
|
interval: 1d
|
2022-12-12 10:23:49 +00:00
|
|
|
window: 5
|
2022-11-21 05:46:13 +00:00
|
|
|
|
2022-11-24 08:51:37 +00:00
|
|
|
# reverseInterval
|
|
|
|
reverseInterval: 4h
|
|
|
|
|
2022-11-21 05:46:13 +00:00
|
|
|
# fastLinReg
|
|
|
|
fastLinReg:
|
|
|
|
interval: 1m
|
2022-11-24 08:51:37 +00:00
|
|
|
window: 30
|
2022-11-21 05:46:13 +00:00
|
|
|
|
|
|
|
# slowLinReg
|
|
|
|
slowLinReg:
|
|
|
|
interval: 1m
|
2022-11-24 08:51:37 +00:00
|
|
|
window: 120
|
2022-11-21 05:46:13 +00:00
|
|
|
|
|
|
|
# allowOppositePosition
|
|
|
|
allowOppositePosition: true
|
|
|
|
|
|
|
|
# fasterDecreaseRatio
|
|
|
|
fasterDecreaseRatio: 2
|
|
|
|
|
|
|
|
# neutralBollinger
|
|
|
|
neutralBollinger:
|
2022-11-24 08:51:37 +00:00
|
|
|
interval: "15m"
|
2022-11-21 05:46:13 +00:00
|
|
|
window: 21
|
|
|
|
bandWidth: 2.0
|
|
|
|
|
|
|
|
# tradeInBand: when tradeInBand is set, you will only place orders in the bollinger band.
|
|
|
|
tradeInBand: true
|
|
|
|
|
|
|
|
# spread
|
|
|
|
spread: 0.1%
|
|
|
|
# dynamicSpread
|
|
|
|
dynamicSpread:
|
|
|
|
amplitude: # delete other scaling strategy if this is defined
|
|
|
|
# window is the window of the SMAs of spreads
|
|
|
|
window: 1
|
|
|
|
interval: "1m"
|
|
|
|
askSpreadScale:
|
|
|
|
byPercentage:
|
|
|
|
# exp means we want to use exponential scale, you can replace "exp" with "linear" for linear scale
|
|
|
|
exp:
|
|
|
|
# from down to up
|
|
|
|
domain: [ 0.0001, 0.005 ]
|
|
|
|
# when in down band, holds 1.0 by maximum
|
|
|
|
# when in up band, holds 0.05 by maximum
|
|
|
|
range: [ 0.001, 0.002 ]
|
|
|
|
bidSpreadScale:
|
|
|
|
byPercentage:
|
|
|
|
# exp means we want to use exponential scale, you can replace "exp" with "linear" for linear scale
|
|
|
|
exp:
|
|
|
|
# from down to up
|
|
|
|
domain: [ 0.0001, 0.005 ]
|
|
|
|
# when in down band, holds 1.0 by maximum
|
|
|
|
# when in up band, holds 0.05 by maximum
|
|
|
|
range: [ 0.001, 0.002 ]
|
|
|
|
|
2022-11-23 09:44:40 +00:00
|
|
|
#maxExposurePosition: 10
|
2022-11-21 05:46:13 +00:00
|
|
|
DynamicExposure:
|
2022-11-22 10:24:04 +00:00
|
|
|
bollBandExposure:
|
|
|
|
interval: "1h"
|
|
|
|
window: 21
|
|
|
|
bandWidth: 2.0
|
|
|
|
dynamicExposurePositionScale:
|
|
|
|
byPercentage:
|
|
|
|
# exp means we want to use exponential scale, you can replace "exp" with "linear" for linear scale
|
|
|
|
exp:
|
|
|
|
# from lower band -100% (-1) to upper band 100% (+1)
|
|
|
|
domain: [ -1, 1 ]
|
|
|
|
# when in down band, holds 1.0 by maximum
|
|
|
|
# when in up band, holds 0.05 by maximum
|
2022-11-23 09:23:18 +00:00
|
|
|
range: [ 0.1, 10 ]
|
2022-11-21 05:46:13 +00:00
|
|
|
|
|
|
|
# quantity is the base order quantity for your buy/sell order.
|
|
|
|
quantity: 0.1
|
|
|
|
dynamicQuantityIncrease:
|
|
|
|
- linRegDynamicQuantity:
|
|
|
|
quantityLinReg:
|
|
|
|
interval: 1m
|
|
|
|
window: 20
|
|
|
|
dynamicQuantityLinRegScale:
|
|
|
|
byPercentage:
|
2022-11-24 08:51:37 +00:00
|
|
|
# log means we want to use log scale, you can replace "log" with "linear" for linear scale
|
|
|
|
linear:
|
2022-11-21 05:46:13 +00:00
|
|
|
# from lower band -100% (-1) to upper band 100% (+1)
|
2022-12-12 10:23:49 +00:00
|
|
|
domain: [ -0.000002, 0.000002 ]
|
2022-11-21 05:46:13 +00:00
|
|
|
# when in down band, holds 1.0 by maximum
|
|
|
|
# when in up band, holds 0.05 by maximum
|
2022-12-12 10:23:49 +00:00
|
|
|
range: [ 0, 0.001 ]
|
2022-11-21 05:46:13 +00:00
|
|
|
dynamicQuantityDecrease:
|
|
|
|
- linRegDynamicQuantity:
|
|
|
|
quantityLinReg:
|
|
|
|
interval: 1m
|
|
|
|
window: 20
|
|
|
|
dynamicQuantityLinRegScale:
|
|
|
|
byPercentage:
|
2022-11-24 08:51:37 +00:00
|
|
|
# log means we want to use log scale, you can replace "log" with "linear" for linear scale
|
|
|
|
linear:
|
2022-11-21 05:46:13 +00:00
|
|
|
# from lower band -100% (-1) to upper band 100% (+1)
|
2022-12-12 10:23:49 +00:00
|
|
|
domain: [0.000002, -0.000002 ]
|
2022-11-21 05:46:13 +00:00
|
|
|
# when in down band, holds 1.0 by maximum
|
|
|
|
# when in up band, holds 0.05 by maximum
|
2022-12-12 10:23:49 +00:00
|
|
|
range: [ 0, 0.001 ]
|
2022-11-23 09:44:40 +00:00
|
|
|
|
|
|
|
exits:
|
|
|
|
# roiStopLoss is the stop loss percentage of the position ROI (currently the price change)
|
|
|
|
- roiStopLoss:
|
2022-11-24 08:51:37 +00:00
|
|
|
percentage: 30%
|