From 4dd0f24edef3a71059ad12cc5eb1518f294c5d4a Mon Sep 17 00:00:00 2001 From: msincenselee Date: Thu, 27 Feb 2020 11:34:07 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20RenkoBarData=EF=BC=8C=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0Color?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/object.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vnpy/trader/object.py b/vnpy/trader/object.py index 800f54f4..a13acc0a 100644 --- a/vnpy/trader/object.py +++ b/vnpy/trader/object.py @@ -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): """