TL;DR. A simple average of the highs and one of the lows form a channel. The trend turns up when the close finishes above the average of highs and down when it finishes below the average of lows, and holds in between. The two lines swap roles with the trend, so they cross exactly when it flips.
What it measures
- A trend that needs a real break to turn. A close inside the channel changes nothing; only a close beyond one of the averages turns the trend.
- The channel's width. The distance between the averages of highs and lows is the typical bar range over the period.
- Each flip. The signal output marks the bar the trend turns.
Formula
Inputs in AlgoLift
| Setting | Default | Range | Notes |
|---|---|---|---|
| Period | 10 | 1 to 500 | Bars in both simple averages. At 1 the averages are the bar's own high and low, which a close can never break, so the channel stays empty. |
Outputs in AlgoLift
| Handle | Type | Plotted | Notes |
|---|---|---|---|
| Up Line | Numeric | Always | The average of highs in an uptrend, the average of lows in a downtrend; empty before the first break. |
| Down Line | Numeric | Always | The other average; empty before the first break. |
| Direction | Numeric | On select | 1 after a close above the average of highs, -1 after a close below the average of lows, 0 before the first. |
| Signal | Numeric | Always | +1 when the trend flips up, -1 when it flips down, 0 elsewhere. Drawn as markers on the chart. The first trend taken is not a signal. |
How to read it
- Up line above the down line: the trend is up; the down line (the average of lows) is the level a close must break to turn it.
- The lines cross: the trend flipped on this bar. The signal output reads +1 or -1.
- A narrow channel: quiet bars; a small move can flip the trend.
- A wide channel: volatile bars; the trend needs a large move to turn, so it holds through pullbacks.
Best in, worst in
Best in markets with steady trends and pullbacks that stay inside the channel.
Worst in wide, choppy ranges where the close breaks the channel on both sides in turn. A longer period or a filter such as the ADX/DMI reduces those whipsaws.
Three setups
1. Trade the flips
Wire Signal into a Comparison greater than 0 for the long Entry and less than 0 for the short.
2. Direction as a trend gate
Compare Direction equal to 1 and AND it into a pullback entry: buy dips while the SSL trend is up.
3. The down line as a stop
In a long, exit through Set Exit Condition when the close falls below Down Line; that close is also the bar the trend flips.
Common mistakes
- Expecting a line from the first bars. Both lines wait for the first break, which can come well after the period.
- Using a period of 1. The close never leaves its own bar's range, so nothing is ever drawn.
- Reading Direction as an event. It holds for many bars; use Signal or a Crossover for one trade per turn.
The SSL Channel turns only on a close beyond the average of highs or lows, and its two lines swap roles at each flip.