예제 #1
0
 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,
     )
예제 #2
0
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)
예제 #3
0
 def ichimoku(self):
     return ta.ichimoku_cloud(self.candles)