コード例 #1
0
    def test_handle_bar_updates_indicator(self):
        # Arrange
        indicator = KeltnerChannel(10, 2.5, MovingAverageType.EXPONENTIAL, MovingAverageType.SIMPLE)

        bar = TestStubs.bar_5decimal()

        # Act
        indicator.handle_bar(bar)

        # Assert
        assert indicator.has_inputs
        assert indicator.middle == 1.0000266666666666
コード例 #2
0
 def setUp(self):
     # Arrange
     self.kc = KeltnerChannel(10, 2.5, MovingAverageType.EXPONENTIAL,
                              MovingAverageType.SIMPLE)
コード例 #3
0
 def setup(self):
     # Fixture Setup
     self.kc = KeltnerChannel(10, 2.5, MovingAverageType.EXPONENTIAL, MovingAverageType.SIMPLE)