money.rave.common.backend.expression.indicator.Open.kt Maven / Gradle / Ivy
package money.rave.common.backend.expression
import money.rave.common.backend.expression.EvaluationContext
import money.rave.common.backend.expression.Expression
import money.rave.common.backend.scaledBigDecimal
import java.math.BigDecimal
class Open(
private val defaultCandleIndex: Int = 0,
) : Expression {
private val name = javaClass.simpleName
override fun evaluate(context: EvaluationContext, candleIndex: Int): BigDecimal =
context.candleDatas[defaultCandleIndex + candleIndex].candle.open!!.scaledBigDecimal()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy