markers的时间粒度精确到秒,避免小时级数据出问题
This commit is contained in:
4
chart.py
4
chart.py
@@ -256,7 +256,7 @@ class QuantChart:
|
|||||||
if item["TD"] in [9, 13]:
|
if item["TD"] in [9, 13]:
|
||||||
markers.append(
|
markers.append(
|
||||||
{
|
{
|
||||||
"time": item["time"].strftime("%Y-%m-%d"),
|
"time": item["time"].strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
"position": "above",
|
"position": "above",
|
||||||
"shape": "arrow_down",
|
"shape": "arrow_down",
|
||||||
"color": "#00FF00",
|
"color": "#00FF00",
|
||||||
@@ -266,7 +266,7 @@ class QuantChart:
|
|||||||
elif item["TD"] in [-9, -13]:
|
elif item["TD"] in [-9, -13]:
|
||||||
markers.append(
|
markers.append(
|
||||||
{
|
{
|
||||||
"time": item["time"].strftime("%Y-%m-%d"),
|
"time": item["time"].strftime("%Y-%m-%d %H:%M:%S"),
|
||||||
"position": "below",
|
"position": "below",
|
||||||
"shape": "arrow_up",
|
"shape": "arrow_up",
|
||||||
"color": "#FF0000",
|
"color": "#FF0000",
|
||||||
|
|||||||
Reference in New Issue
Block a user