This commit is contained in:
2026-08-24 20:53:21 +08:00
commit 6e78bba16a
287 changed files with 32443 additions and 0 deletions

27
ptn/hammer/v2.go Normal file
View File

@@ -0,0 +1,27 @@
package hammer
import (
"github.com/banbox/banbot/config"
"github.com/banbox/banbot/strat"
)
const (
v2AtrLen = 14
v2WatchMin = 5 // 入场后观察后续蜡烛的最少个数
v2WatchMax = 100 // 入场后观察后续蜡烛的最多个数
v2RefNum = 20 // 回顾历史回撤的数量
)
func MainV2(pol *config.RunPolicyConfig) *strat.TradeStrat {
return &strat.TradeStrat{
Version: 1,
WarmupNum: 3000,
MinTfScore: 0.75,
DrawDownExit: true,
StopEnterBars: 10,
OnStartUp: func(s *strat.StratJob) {
s.More = &MoreHammer{}
},
OnBar: makeOnBar(v2AtrLen, v2RefNum, v2WatchMin, v2WatchMax, 3),
}
}