Esempio n. 1
0
    def test_handle_quote_tick_updates_indicator(self):
        # Arrange
        indicator = ExponentialMovingAverage(10, PriceType.MID)

        tick = TestStubs.quote_tick_5decimal(AUDUSD_SIM.symbol)

        # Act
        indicator.handle_quote_tick(tick)

        # Assert
        self.assertTrue(indicator.has_inputs)
        self.assertEqual(1.00002, indicator.value)
Esempio n. 2
0
    def test_handle_quote_tick_updates_indicator(self):
        # Arrange
        indicator = ExponentialMovingAverage(10, PriceType.MID)

        tick = TestDataStubs.quote_tick_5decimal(AUDUSD_SIM.id)

        # Act
        indicator.handle_quote_tick(tick)

        # Assert
        assert indicator.has_inputs
        assert indicator.value == 1.00002