Class TransformRTIndicator
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.core.AbstractRTIndicator
com.wualabs.qtsurfer.engine.indicators.core.AbstractDecorableRTIndicator
com.wualabs.qtsurfer.engine.indicators.numeric.TransformRTIndicator
- All Implemented Interfaces:
Resettable, RTIndicator
- Direct Known Subclasses:
ClampRTIndicator
Allow to apply a transformation function to a RTIndicator value
-
Constructor Summary
ConstructorsConstructorDescriptionTransformRTIndicator(@NonNull RTIndicator indicator, @NonNull UnaryOperator<Double> transformation) -
Method Summary
Modifier and TypeMethodDescriptionstatic TransformRTIndicatorabs(RTIndicator indicator) Transforms the input indicator by indicator.abs(coefficient).static TransformRTIndicatorclamp(RTIndicator indicator, @NonNull Number minRange, @NonNull Number maxRange) Transforms the input indicator by indicator.clamp(minRange,maxRange).static TransformRTIndicatordivide(RTIndicator indicator, @NonNull Number coefficient) Transforms the input indicator by indicator.divide(coefficient).static TransformRTIndicatorlog(RTIndicator indicator) Transforms the input indicator by indicator.log(coefficient).static TransformRTIndicatormax(RTIndicator indicator, @NonNull Number coefficient) Transforms the input indicator by indicator.max(coefficient).static TransformRTIndicatormin(RTIndicator indicator, @NonNull Number coefficient) Transforms the input indicator by indicator.min(coefficient).static TransformRTIndicatorminus(RTIndicator indicator, @NonNull Number coefficient) Transforms the input indicator by indicator.minus(coefficient).static TransformRTIndicatormultiply(RTIndicator indicator, @NonNull Number coefficient) Transforms the input indicator by indicator.multiply(coefficient).static TransformRTIndicatorplus(RTIndicator indicator, @NonNull Number coefficient) Transforms the input indicator by indicator.plus(coefficient).static TransformRTIndicatorsqrt(RTIndicator indicator) Transforms the input indicator by indicator.sqrt(coefficient).doubleupdate(double newValue) Methods inherited from class AbstractDecorableRTIndicator
getIndicator, getIndicatorValueMethods inherited from class AbstractRTIndicator
equals, getDisplayHint, getMeta, getValue, hashCode, hide, isPoison, reset, setValue, toString, toString, withDisplayHint, withMeta
-
Constructor Details
-
TransformRTIndicator
public TransformRTIndicator(@NonNull @NonNull RTIndicator indicator, @NonNull @NonNull UnaryOperator<Double> transformation)
-
-
Method Details
-
update
public double update(double newValue) - Specified by:
updatein interfaceRTIndicator- Overrides:
updatein classAbstractRTIndicator
-
plus
public static TransformRTIndicator plus(RTIndicator indicator, @NonNull @NonNull Number coefficient) Transforms the input indicator by indicator.plus(coefficient). -
minus
public static TransformRTIndicator minus(RTIndicator indicator, @NonNull @NonNull Number coefficient) Transforms the input indicator by indicator.minus(coefficient). -
divide
public static TransformRTIndicator divide(RTIndicator indicator, @NonNull @NonNull Number coefficient) Transforms the input indicator by indicator.divide(coefficient). -
multiply
public static TransformRTIndicator multiply(RTIndicator indicator, @NonNull @NonNull Number coefficient) Transforms the input indicator by indicator.multiply(coefficient). -
max
Transforms the input indicator by indicator.max(coefficient). -
min
Transforms the input indicator by indicator.min(coefficient). -
clamp
public static TransformRTIndicator clamp(RTIndicator indicator, @NonNull @NonNull Number minRange, @NonNull @NonNull Number maxRange) Transforms the input indicator by indicator.clamp(minRange,maxRange). -
abs
Transforms the input indicator by indicator.abs(coefficient). -
sqrt
Transforms the input indicator by indicator.sqrt(coefficient). -
log
Transforms the input indicator by indicator.log(coefficient).
-