Small-Timeframe Breakouts with Higher-Timeframe Trend Filters
Summary
This strategy seeks long breakouts on a smaller chart timeframe when the broader trend is supportive. It defines a breakout using a recent swing high and places an initial stop near recent lows, with configurable lookback periods. Moving averages calculated on a higher timeframe help identify trend direction; a slower average can filter out entries when price is below it. After entry, the position can be trailed using a close below a selected higher-timeframe moving average.
The script also describes an optional ATR filter intended to favor consolidations with relatively tight ranges and a more favorable distance between entry and stop. It exposes choices for moving-average type, timeframe, lengths, and backtest dates. The supplied document is an incomplete code excerpt: the ATR filtering conditions and remaining execution logic are cut off, and it reports no test results. The method therefore offers a configurable framework, but does not establish profitability or show how it behaves across markets, costs, or timeframes.
Key ideas
- The setup combines smaller-timeframe breakouts with direction from higher-timeframe moving averages.
- An initial stop is based on recent lows, with its placement controlled by a lookback setting.
- A slower moving average can filter entries when price is below it.
- A selected higher-timeframe moving average can guide trailing exits as a trade advances.
- An optional ATR comparison is intended to screen for tighter consolidations, but the provided excerpt omits its full logic and results.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.