add backtest config

This commit is contained in:
narumi 2023-10-11 12:12:57 +08:00
parent d8ff42d531
commit 4a6f6f7a5a
2 changed files with 21 additions and 4 deletions

View File

@ -1,10 +1,27 @@
--- ---
backtest:
startTime: "2023-01-01"
endTime: "2023-05-31"
symbols:
- USDCUSDT
sessions:
- max
accounts:
max:
balances:
USDC: 500.0
USDT: 500.0
exchangeStrategies: exchangeStrategies:
- on: max - on: max
fixedmaker: fixedmaker:
symbol: BTCUSDT symbol: USDCUSDT
interval: 5m interval: 5m
halfSpread: 0.05% halfSpread: 0.05%
quantity: 0.005 quantity: 15
orderType: LIMIT_MAKER orderType: LIMIT_MAKER
dryRun: true dryRun: false
positionHardLimit: 1500
maxPositionQuantity: 1500
circuitBreakLossThreshold: -0.15

View File

@ -64,7 +64,7 @@ func (s *Strategy) Validate() error {
} }
if s.HalfSpread.Float64() <= 0 { if s.HalfSpread.Float64() <= 0 {
return fmt.Errorf("halfSpreadRatio should be positive") return fmt.Errorf("halfSpread should be positive")
} }
return nil return nil
} }