trade time

This commit is contained in:
ying liu 2024-08-05 17:47:44 +08:00
parent 79ae41c0cc
commit c9b8636a48
2 changed files with 8 additions and 6 deletions

View File

@ -18,12 +18,14 @@ exchangeStrategies:
symbols:
- ARUSDT
- ORDIUSDT
- XRPUSDT
- OPUSDT
- OMUSDT
- WIFUSDT
- DYDXUSDT
- XRPUSDT
- PEOPLEUSDT
- WLDUSDT
# - STXUSDT
# - WLDUSDT
# - FILUSDT
@ -39,7 +41,7 @@ exchangeStrategies:
interval: 15m
nrInterval: 15m
cciInterval: 15m
atrInterval: 2h
atrInterval: 1h
nrCount: 4
cciWindow: 20
atrWindow: 14
@ -51,14 +53,14 @@ exchangeStrategies:
leverage: 5.0
profitRange: 5%
lossRange: 1%
amount: 20
amount: 10
placePriceType: 2
lossType: 1
profitOrderType: 0
atrProfitRange: 1.0
atrLossRange: 2.0
tradeStartHour: 0
tradeEndHour: 8
atrLossRange: 3.0
tradeStartHour: 8
tradeEndHour: 23
pauseTradeLoss: -10.0
# recalculate: false
# dry_run: false

View File

@ -426,7 +426,7 @@ func (s *Strategy) isTradeTime(ctx context.Context) bool {
now := time.Now().In(location)
hour := now.Hour()
return !(hour >= s.TradeStartHour && hour < s.TradeEndHour)
return hour >= s.TradeStartHour && hour < s.TradeEndHour
}
func (s *Strategy) isPauseTrade(ctx context.Context) bool {