Combining Stochastic, RSI, and MACD Signals for Trading
Summary
This script combines three indicators to generate directional scores: smoothed stochastic K and D lines, RSI relative to its midpoint, and the MACD histogram relative to zero and its recent direction. It assigns up to three bullish or bearish criteria and highlights a signal when at least two agree. The stochastic and moving-average calculations can use several smoothing methods, while inputs adjust indicator lengths and the display settings.
The strategy enters long when the bullish score exceeds one and short when the bearish score does, within a selectable date range. It sets trade size from initial capital and price and defines percentage-based profit and loss levels. The accompanying description discusses Heikin-Ashi and moving-average alignment, but those rules do not appear in the displayed strategy code; the code instead uses stochastic, RSI, and MACD conditions. It supplies no performance evidence, and the shared close conditions for both directions warrant careful review before interpreting backtests.
Key ideas
- Bullish and bearish scores combine stochastic direction, RSI position, and MACD histogram behavior.
- A score of two or more indicator conditions triggers the corresponding entry condition.
- Inputs allow changes to moving-average style, indicator periods, date range, and percentage exits.
- The descriptive text and executable code differ on which indicators define the strategy.
- No results are provided, and the exit logic should be validated before relying on a backtest.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.