diff --git a/hts/HTS.py b/hts/HTS.py index 56521d0..1f094e6 100644 --- a/hts/HTS.py +++ b/hts/HTS.py @@ -292,7 +292,7 @@ class HTS: day = objStockChart.GetDataValue(0, i) if day < int_given_day: continue - time = datetime.strptime(day+" "+str(objStockChart.GetDataValue(1, i)), '%Y%m%d %H%M%S') + time = datetime.strptime(str(day)+" "+str(objStockChart.GetDataValue(1, i)), '%Y%m%d %H%M%S') if time < start_time: continue @@ -305,16 +305,21 @@ class HTS: if len(result["check"]) == 0: result["check"].add(start_time) result["time"].append(start_time) + result["open"].append(open) + result["close"].append(open) + result["high"].append(open) + result["low"].append(open) + result["vol"].append(0) if time not in result["check"]: result["check"].add(time) result["time"].append(time) - result["open"].append(open) - result["close"].append(close) - result["high"].append(high) - result["low"].append(low) - result["vol"].append(vol) + result["open"].append(open) + result["close"].append(close) + result["high"].append(high) + result["low"].append(low) + result["vol"].append(vol) return