OmegaChartのソースコードの保守
Revisão | bdd136d0b9b36df55a5360f7e4002ae32db8a449 (tree) |
---|---|
Hora | 2014-08-19 23:14:29 |
Autor | panacoran <panacoran@user...> |
Commiter | panacoran |
Yahoo時系列から株価を取得するときに上場前の出来高0のデータを取り除く
@@ -147,8 +147,15 @@ namespace Zanetti.DataSource.Specialized | ||
147 | 147 | public void UpdateDataFarm(int code, SortedDictionary<int, NewDailyData> prices) |
148 | 148 | { |
149 | 149 | var farm = (DailyDataFarm)Env.BrandCollection.FindBrand(code).CreateDailyFarm(prices.Count); |
150 | + var empty = farm.IsEmpty; | |
151 | + var skip = true; | |
150 | 152 | foreach (var pair in prices) |
153 | + { | |
154 | + if (empty && skip && pair.Value.volume == 0) | |
155 | + continue; | |
156 | + skip = false; | |
151 | 157 | farm.UpdateDataFarm(pair.Key, pair.Value); |
158 | + } | |
152 | 159 | farm.Save(Util.GetDailyDataFileName(code)); |
153 | 160 | } |
154 | 161 |