ta4j-examples/src/main/java/ta4jexamples/bots/TradingBotOnMovingTimeSeries.java
private static Decimal randDecimal(Decimal min, Decimal max) {
        Decimal randomDecimal = null;
        if (min != null && max != null && min.isLessThan(max)) {
            randomDecimal = max.minus(min).multipliedBy(Decimal.valueOf(Math.random())).plus(min);
        }
        return randomDecimal;
    }
private static Decimal randDecimal(Decimal min, Decimal max) {
        Decimal randomDecimal = null;
        if (min != null && max != null && min.isLessThan(max)) {
            randomDecimal = max.minus(min).multipliedBy(Decimal.valueOf(Math.random())).plus(min);
        }
        return randomDecimal;
    }
private static Decimal randDecimal ( Decimal min , Decimal max ) { Decimal randomDecimal = null ; if ( min != null && max != null && min . isLessThan ( max ) ) { randomDecimal = max . minus ( min ) . multipliedBy ( Decimal . valueOf ( Math . random ( ) ) ) . plus ( min ) ; } return randomDecimal ; }
Generates a random decimal number between min and max.
@param min the minimum bound
@param max the maximum bound
@return a random decimal number between min and max
Generates a random decimal number between min and max .