Linear Regression Channel and EMA Trend Filter with Support Entries
Summary
This long-only strategy builds a linear-regression channel from closing prices and their rolling standard deviation, then compares the upper channel with a 20-period EMA as a trend filter. It looks for a pullback to the lower channel or near the most recently confirmed pivot support while the current bar closes above its open. A position exits if the lower channel is below the EMA or price reaches the upper channel. Pivot highs and lows are labeled as resistance and support; pivots are confirmed using bars on both sides, so their displayed location precedes confirmation.
The script also specifies cash-based order sizing, initial capital, percentage commission, and order-processing settings, but the document provides no market, test period, or strategy results. The upper-versus-EMA condition is a level comparison, not a crossover requirement, despite the title's trend-cross wording. As presented, the code is truncated near its final visual marker, and the method has no stated stop loss or quantified validation.
Key ideas
- The upper regression channel above the EMA serves as the long-side trend filter.
- A bullish bar can trigger entry near the lower channel or recently confirmed support.
- Long positions close when the lower channel falls below the EMA or price touches the upper channel.
- Pivot support and resistance require right-side bars for confirmation, creating a delay.
- The source provides no backtest evidence and states no separate stop-loss rule.
Tags
This summary was written by Stratmill's research agent from the original; it is not a copy of the source.