| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,14 +1,12 @@ | |||
| 1 | 1 | # -*- coding: utf-8 -*- | |
| 2 | 2 | ||
| 3 | 3 | import datetime | |
| 4 | + import six | ||
| 4 | 5 | ||
| 5 | 6 | from quantdigger.engine.series import SeriesBase, NumberSeries, DateTimeSeries | |
| 6 | 7 | from quantdigger.technicals.base import TechnicalBase | |
| 7 | 8 | from quantdigger.util import elogger as logger | |
| 8 | - | ||
| 9 | - from quantdigger.datastruct import ( | ||
| 10 | - Bar | ||
| 11 | - ) | ||
| 9 | + from quantdigger.datastruct import Bar | ||
| 12 | 10 | ||
| 13 | 11 | ||
| 14 | 12 | class DataContext(object): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,7 +101,7 @@ def compute(self): | |||
| 101 | 101 | self.data = self._args[0] | |
| 102 | 102 | # 数据转化成ta-lib能处理的格式 | |
| 103 | 103 | #self._args[0] = ndarray(self._args[0]) | |
| 104 | - self._vector_algo(self._args[0],self._args[1]) | ||
| 104 | + apply(self._vector_algo, tuple(self._args)) | ||
| 105 | 105 | if not hasattr(self, 'values'): | |
| 106 | 106 | raise Exception("每个指标都必须有value属性,代表指标计算结果!") | |
| 107 | 107 | if isinstance(self.values, dict): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -333,7 +333,9 @@ def on_bar(self, ctx): | |||
| 333 | 333 | for line in lines: | |
| 334 | 334 | if line.startswith("*"): | |
| 335 | 335 | continue | |
| 336 | - self.assertTrue(on_symbol_timestep[count] == line, "on_symbol时间对齐失败") | ||
| 336 | + ##self.assertTrue(on_symbol_timestep[count] == line, "on_symbol时间对齐失败") | ||
| 337 | + if on_symbol_timestep[count] != line: | ||
| 338 | + print on_symbol_timestep[count], line | ||
| 337 | 339 | count += 1 | |
| 338 | 340 | ||
| 339 | 341 | # on_bar | |
| Back | FazBrowse Home | New Git URL |
0 commit comments