Define the trend, wait for a pullback to the averages, and trail behind it. Stay out when the averages are flat and tangled.
Updated Sep 30, 2026 · trend, moving-averages, pullback
Trend following assumes a trend that is in place is more likely to continue than to reverse. Moving averages give a lagging, smoothed view of it. They confirm a trend; they do not predict one.
get_candles.structure.trend (higher highs and lows, or lower ones) as the swing-based check: both should agree.draw_on_chart cannot draw moving averages: do not invent their values. State where price sits relative to them only if you can verify it from the candles, or if the user has them on the chart. Draw what the trend logic produces:
trendline along the higher lows (or lower highs), or a channel edge.zone kind range for the pullback area (the band between the swing that began the pullback and the prior support), and level for the last swing low/high, which is the invalidation reference.marker on a cross or a rejection candle at the pullback.position when a concrete pullback setup is discussed.A close through the 50-period average together with a lower low (uptrend) or higher high (downtrend). A flat, tangled set of averages: the trend is over and the read changes to a range.
Chop is where trend rules lose. If price crosses the averages repeatedly, say the market is ranging and defer to a support/resistance read.