A Two-Feature Historical Classification Indicator for Market Direction
Summary
This indicator presents a simple classification approach that compares two selected inputs with past observations to produce a bullish or bearish reading. Inputs can include stochastic, RSI, z-score, money flow, volume, or distance from a moving average. The target label can represent candle direction, a candle-range comparison involving ATR, or an ATR-related range breakout. For each feature, the script counts historical labels whose feature values fall within a selected threshold of the current value, then combines the pass and fail counts into a vote. It also displays per-feature counts, accuracy figures, and a feature-weight visualization.
Despite its name, the implementation is not a conventional random forest: it uses threshold-based neighbor counts and voting, without tree ensembles. The code shuffles historical rows, but the supplied text gives no out-of-sample test or benchmark. Its accuracy calculations and use of current labels deserve careful review, and the random shuffling does not by itself prevent leakage or establish predictive skill. The indicator is best read as an experimental example of feature-based classification, not evidence of a validated forecasting model.
Key ideas
- The indicator selects two features from common price and volume measures and compares each with historical values near the current reading.
- Historical target labels encode candle direction or an ATR-related condition, and feature counts contribute to a combined vote.
- A table reports vote counts and accuracy estimates, while chart labels visualize feature contributions.
- The method is a threshold-based voting classifier rather than a conventional random forest.
- No out-of-sample results or benchmark are provided, and the accuracy calculation should be independently checked before interpretation.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.