def ichimoku(self): # Ichimoku cloud using parameters adapted to crypto market return ta.ichimoku_cloud( self.candles, conversion_line_period=20, base_line_period=30, lagging_line_period=120, displacement=60, )
def test_ichimoku_cloud(): candles = np.array(ichimoku_candles) ic = ta.ichimoku_cloud(candles) current_conversion_line, current_base_line, span_a, span_b = ic assert type(ic).__name__ == 'IchimokuCloud' assert (current_conversion_line, current_base_line, span_a, span_b) == (8861.59, 8861.59, 8466.385, 8217.45)
def ichimoku(self): return ta.ichimoku_cloud(self.candles)