mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 08:45:16 +00:00
fix: highest price normalization in drift strategy
This commit is contained in:
parent
c51a99400d
commit
7310feb0de
|
@ -342,7 +342,7 @@ func (s *Strategy) Run(ctx context.Context, orderExecutor bbgo.OrderExecutor, se
|
|||
canvas := types.NewCanvas(s.InstanceID(), s.Interval)
|
||||
fmt.Println(dynamicKLine.StartTime, dynamicKLine.EndTime)
|
||||
mean := priceLine.Mean(100)
|
||||
highestPrice := priceLine.Highest(100)
|
||||
highestPrice := priceLine.Minus(mean).Highest(100)
|
||||
highestDrift := s.drift.Highest(100)
|
||||
ratio := highestDrift / highestPrice
|
||||
canvas.Plot("drift", s.drift, dynamicKLine.StartTime, 100)
|
||||
|
|
Loading…
Reference in New Issue
Block a user