Separate increasing data from decreasing data. The data is increasing when close value > open value and decreasing when the close value <= open value.
(self)
| 229 | self.get_candle_increase() |
| 230 | |
| 231 | def get_candle_increase(self): |
| 232 | """ |
| 233 | Separate increasing data from decreasing data. |
| 234 | |
| 235 | The data is increasing when close value > open value |
| 236 | and decreasing when the close value <= open value. |
| 237 | """ |
| 238 | increase_y = [] |
| 239 | increase_x = [] |
| 240 | for index in range(len(self.open)): |
| 241 | if self.close[index] > self.open[index]: |
| 242 | increase_y.append(self.low[index]) |
| 243 | increase_y.append(self.open[index]) |
| 244 | increase_y.append(self.close[index]) |
| 245 | increase_y.append(self.close[index]) |
| 246 | increase_y.append(self.close[index]) |
| 247 | increase_y.append(self.high[index]) |
| 248 | increase_x.append(self.x[index]) |
| 249 | |
| 250 | increase_x = [[x, x, x, x, x, x] for x in increase_x] |
| 251 | increase_x = utils.flatten(increase_x) |
| 252 | |
| 253 | return increase_x, increase_y |
| 254 | |
| 255 | def get_candle_decrease(self): |
| 256 | """ |
no outgoing calls
no test coverage detected