[update] RenkoBarData,增加Color
This commit is contained in:
parent
78c30de2f4
commit
4dd0f24ede
@ -6,7 +6,7 @@ from dataclasses import dataclass
|
||||
from datetime import datetime
|
||||
from logging import INFO
|
||||
|
||||
from .constant import Direction, Exchange, Interval, Offset, Status, Product, OptionType, OrderType
|
||||
from .constant import Direction, Exchange, Interval, Offset, Status, Product, OptionType, OrderType, Color
|
||||
|
||||
ACTIVE_STATUSES = set([Status.SUBMITTING, Status.NOTTRADED, Status.PARTTRADED, Status.CANCELLING])
|
||||
|
||||
@ -108,6 +108,7 @@ class RenkoBarData(BarData):
|
||||
"""
|
||||
Renko bar data of a certain trading period.
|
||||
"""
|
||||
color: Color = Color.EQUAL # bar的颜色
|
||||
seconds: int = 0 # 当前Bar的秒数(针对RenkoBar)
|
||||
high_seconds: int = -1 # 当前Bar的上限秒数
|
||||
low_seconds: int = -1 # 当前bar的下限秒数
|
||||
@ -117,7 +118,6 @@ class RenkoBarData(BarData):
|
||||
low_time = None # 最后一次进入低位区域的时间
|
||||
high_time = None # 最后一次进入高位区域的时间
|
||||
|
||||
|
||||
@dataclass
|
||||
class OrderData(BaseData):
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user