Class AdaptiveFisherTransformRTIndicator
java.lang.Object
com.wualabs.qtsurfer.engine.indicators.core.AbstractRTIndicator
com.wualabs.qtsurfer.engine.indicators.momentum.pro.AdaptiveFisherTransformRTIndicator
- All Implemented Interfaces:
Resettable, RTIndicator
Adaptive Fisher Transform indicator using Kaufman Efficiency Ratio for period adaptation.
Adapts the Fisher Transform's normalization window based on market regime:
ER = |price - price[erPeriod]| / sum(|diff|, erPeriod) adaptivePeriod = round(minPeriod + (1 - ER) * (maxPeriod - minPeriod)) normalized = 2 * (price - lowest(adaptivePeriod)) / (highest - lowest) - 1 smoothed = 0.5 * normalized + 0.5 * prevSmoothed fisher = 0.5 * ln((1 + smoothed) / (1 - smoothed)) + 0.5 * prevFisher
When trending (ER near 1), uses a short normalization window for fast adaptation. When choppy (ER near 0), uses a long window for smoother output.
-
Constructor Summary
ConstructorsConstructorDescriptionAdaptiveFisherTransformRTIndicator(int erPeriod, int minPeriod, int maxPeriod) -
Method Summary
Methods inherited from class AbstractRTIndicator
equals, getDisplayHint, getMeta, getValue, hashCode, hide, isPoison, setValue, toString, toString, withDisplayHint, withMeta
-
Constructor Details
-
AdaptiveFisherTransformRTIndicator
public AdaptiveFisherTransformRTIndicator() -
AdaptiveFisherTransformRTIndicator
public AdaptiveFisherTransformRTIndicator(int erPeriod, int minPeriod, int maxPeriod)
-
-
Method Details
-
getErPeriod
public int getErPeriod() -
getEfficiencyRatio
public double getEfficiencyRatio() -
getAdaptivePeriod
public int getAdaptivePeriod() -
isReady
public boolean isReady()Description copied from interface:RTIndicatorReturns whether this indicator has received enough data to produce meaningful values.During the warmup period,
RTIndicator.getValue()may return 0 or a partial estimate that should not be used for trading decisions. Once this method returnstrue, the indicator's output is statistically valid.The default implementation returns
truefor backward compatibility. Indicators with warmup requirements should override this method.For composite indicators (e.g. Bollinger Bands, MACD), readiness is determined by the slowest internal component.
- Returns:
trueif the indicator has completed its warmup period
-
reset
public void reset()- Specified by:
resetin interfaceResettable- Overrides:
resetin classAbstractRTIndicator
-
update
public double update(double newValue) - Specified by:
updatein interfaceRTIndicator- Overrides:
updatein classAbstractRTIndicator
-