APISonar


org.ta4j.core.analysis.Returns.ReturnType.LOG

> org > ta4j > core > analysis > Returns > ReturnType > LOG
org APIs ta4j APIs core APIs analysis APIs Returns APIs ReturnType APIs LOG APIs

Example 1
public Num calculate(BarSeries series, TradingRecord tradingRecord) {
        Returns returns = new Returns(series, tradingRecord, Returns.ReturnType.LOG);
        return calculateES(returns, confidence);
    }
Example 2
public Num calculate(BarSeries series, Trade trade) {
        if (trade != null && trade.isClosed()) {
            Returns returns = new Returns(series, trade, Returns.ReturnType.LOG);
            return calculateVaR(returns, confidence);
        }
        return series.numOf(0);
    }