Search in sources :

Example 1 with DonchianChannelLower

use of com.github.jnidzwetzki.cryptobot.strategy.indicator.DonchianChannelLower in project crypto-bot by jnidzwetzki.

the class DonchianBot method getLowerChannelValue.

/**
 * Get the lower channel value
 * @param currencyPair
 * @return
 */
private Decimal getLowerChannelValue(final BitfinexCurrencyPair currencyPair) {
    final TimeSeries currencyTimeSeries = timeSeries.get(currencyPair);
    final MinPriceIndicator minPrice = new MinPriceIndicator(currencyTimeSeries);
    final DonchianChannelLower donchianChannelLower = new DonchianChannelLower(minPrice, periodOut);
    return donchianChannelLower.getValue(currencyTimeSeries.getEndIndex());
}
Also used : TimeSeries(org.ta4j.core.TimeSeries) DonchianChannelLower(com.github.jnidzwetzki.cryptobot.strategy.indicator.DonchianChannelLower) MinPriceIndicator(org.ta4j.core.indicators.helpers.MinPriceIndicator)

Aggregations

DonchianChannelLower (com.github.jnidzwetzki.cryptobot.strategy.indicator.DonchianChannelLower)1 TimeSeries (org.ta4j.core.TimeSeries)1 MinPriceIndicator (org.ta4j.core.indicators.helpers.MinPriceIndicator)1