-
-
Notifications
You must be signed in to change notification settings - Fork 301
/
supertrend.yaml
124 lines (108 loc) · 3.95 KB
/
supertrend.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
---
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
startTime: "2022-05-01"
endTime: "2022-10-31"
symbols:
- BTCUSDT
accounts:
binance:
makerCommission: 10 # 0.15%
takerCommission: 15 # 0.15%
balances:
BTC: 50.0
USDT: 10000.0
exchangeStrategies:
- on: binance
supertrend:
symbol: BTCUSDT
# interval is how long do you want to update your order price and quantity
interval: 1m
# ATR window used by Supertrend
window: 220
# ATR Multiplier for calculating super trend prices, the higher, the stronger the trends are
supertrendMultiplier: 10
# leverage uses the account net value to calculate the order qty
leverage: 1.0
# quantity sets the fixed order qty, takes precedence over Leverage
#quantity: 0.5
# fastDEMAWindow and slowDEMAWindow are for filtering super trend noise
fastDEMAWindow: 28
slowDEMAWindow: 170
# Use linear regression as trend confirmation
linearRegression:
interval: 1m
window: 18
# TP according to ATR multiple, 0 to disable this
TakeProfitAtrMultiplier: 0
# Set SL price to the low of the triggering Kline
stopLossByTriggeringK: false
# TP/SL by reversed supertrend signal
stopByReversedSupertrend: false
# TP/SL by reversed DEMA signal
stopByReversedDema: false
# TP/SL by reversed linear regression signal
stopByReversedLinGre: false
# Draw pnl
drawGraph: true
graphPNLPath: "./pnl.png"
graphCumPNLPath: "./cumpnl.png"
exits:
# roiStopLoss is the stop loss percentage of the position ROI (currently the price change)
- roiStopLoss:
percentage: 2%
- trailingStop:
callbackRate: 2%
#activationRatio: 20%
minProfit: 10%
interval: 1m
side: both
closePosition: 100%
- higherHighLowerLowStopLoss:
# interval is the kline interval used by this exit
interval: 15m
# window is used as the range to determining higher highs and lower lows
window: 5
# highLowWindow is the range to calculate the number of higher highs and lower lows
highLowWindow: 12
# If the number of higher highs or lower lows with in HighLowWindow is less than MinHighLow, the exit is
# triggered. 0 disables this parameter. Either one of MaxHighLow and MinHighLow must be larger than 0
minHighLow: 2
# If the number of higher highs or lower lows with in HighLowWindow is more than MaxHighLow, the exit is
# triggered. 0 disables this parameter. Either one of MaxHighLow and MinHighLow must be larger than 0
maxHighLow: 0
# ActivationRatio is the trigger condition
# When the price goes higher (lower for short position) than this ratio, the stop will be activated.
# You can use this to combine several exits
activationRatio: 0.5%
# DeactivationRatio is the kill condition
# When the price goes higher (lower for short position) than this ratio, the stop will be deactivated.
# You can use this to combine several exits
deactivationRatio: 10%
# If true, looking for lower lows in long position and higher highs in short position. If false, looking for
# higher highs in long position and lower lows in short position
oppositeDirectionAsPosition: false
profitStatsTracker:
interval: 1d
window: 30
accumulatedProfitReport:
profitMAWindow: 60
shortTermProfitWindow: 14
accumulateTradeWindow: 30
tsvReportPath: res.tsv
trackParameters: false