use of com.github.jnidzwetzki.cryptobot.strategy.indicator.DonchianChannelUpper in project crypto-bot by jnidzwetzki.
the class DonchianBot method getUpperChannelValue.
/**
* Get the upper channel value
* @param currencyPair
* @return
*/
private Decimal getUpperChannelValue(final BitfinexCurrencyPair currencyPair) {
final TimeSeries currencyTimeSeries = timeSeries.get(currencyPair);
final MaxPriceIndicator maxPrice = new MaxPriceIndicator(currencyTimeSeries);
final DonchianChannelUpper donchianChannelUpper = new DonchianChannelUpper(maxPrice, periodIn);
return donchianChannelUpper.getValue(currencyTimeSeries.getEndIndex());
}
Aggregations