Consecutive-Bar Entries with Reversal and Stop Management
Summary
This strategy counts consecutive closes higher or lower than the preceding close and enters after user-set streak lengths. Traders can use the signals in their stated direction or reverse them, and can allow a new signal to reverse an open position directly or require the strategy to be flat first. The script also permits restricting entries to long or short trades and delays signal eligibility until a minimum amount of chart history has accumulated.
Optional exits use either recent swing highs and lows or an ATR-based distance, with a configurable risk-reward multiple for profit targets. A trailing-stop option adjusts the stop as price moves favorably. The document provides code and configurable inputs, but no strategy report or tested results. Its default parameters and backtest assumptions are examples rather than evidence of an edge; performance may depend on market, timeframe, costs, and execution assumptions.
Key ideas
- Entry signals trigger after configurable runs of rising or falling closes.
- A reversal setting swaps the direction associated with each streak signal.
- Direct reversal can be enabled, or entries can be limited to when the position is flat.
- Swing-based and ATR-based stops can define profit targets through a risk-reward multiple.
- Trailing stops are optional, and the document reports no performance evidence.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.