equal
deleted
inserted
replaced
142 @param end_tick: end tick of given range (default None, last data) |
142 @param end_tick: end tick of given range (default None, last data) |
143 @return: Data as numpy.array([(tick, value, forced),...]) |
143 @return: Data as numpy.array([(tick, value, forced),...]) |
144 """ |
144 """ |
145 # Return immediately if data empty or none |
145 # Return immediately if data empty or none |
146 if self.Data is None or self.Data.count == 0: |
146 if self.Data is None or self.Data.count == 0: |
147 return [] |
147 return None |
148 |
148 |
149 # Find nearest data outside given range indexes |
149 # Find nearest data outside given range indexes |
150 start_idx = (self.GetNearestData(start_tick, -1) |
150 start_idx = (self.GetNearestData(start_tick, -1) |
151 if start_tick is not None |
151 if start_tick is not None |
152 else 0) |
152 else 0) |
184 @return: (numpy.array([(tick, value, forced),...]), |
184 @return: (numpy.array([(tick, value, forced),...]), |
185 min_value, max_value) |
185 min_value, max_value) |
186 """ |
186 """ |
187 # Get data in given tick range |
187 # Get data in given tick range |
188 data = self.GetData(start_tick, end_tick) |
188 data = self.GetData(start_tick, end_tick) |
|
189 |
|
190 if data is None: |
|
191 return None, None, None |
189 |
192 |
190 # Value range is calculated on whole data |
193 # Value range is calculated on whole data |
191 if full_range: |
194 if full_range: |
192 return data, self.MinValue, self.MaxValue |
195 return data, self.MinValue, self.MaxValue |
193 |
196 |