mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-26 00:35:15 +00:00
fix position.IsOpened method
Signed-off-by: c9s <yoanlin93@gmail.com>
This commit is contained in:
parent
3e6b975c2c
commit
fa98f3fda2
|
@ -274,7 +274,7 @@ func (p *Position) IsClosed() bool {
|
|||
}
|
||||
|
||||
func (p *Position) IsOpened(currentPrice fixedpoint.Value) bool {
|
||||
return p.IsClosed() || !p.IsDust(currentPrice)
|
||||
return !p.IsClosed() && !p.IsDust(currentPrice)
|
||||
}
|
||||
|
||||
func (p *Position) Type() PositionType {
|
||||
|
|
Loading…
Reference in New Issue
Block a user