Clearwater | Efficiency-Adaptive Trend Strategy by blitz_algo

By blitz_algo

Performance Metrics

Description

Clearwater is a SuperTrend strategy built around one question: is this move clean or noisy?It answers with the Efficiency Ratio (ER). ER compares how far price actually moved with how far it travelled getting there. A reading near 1 means a clean, directional move. A reading near 0 means price is churning.That one reading drives four parts of the strategy:Baseline: an adaptive moving average (KAMA-style) hugs price in clean trends and barely moves in chop.Bands: the ATR multiplier shrinks as efficiency rises, so stops tighten in clean trends. It widens when efficiency falls, so the strategy can ride out noise. The SuperTrend ratchet means a live stop can tighten but never loosen.Entry gate: a flip is only traded if ER is above your minimum. A blocked flip stays valid for a short window, so you can still enter late if the trend proves itself. Otherwise it is skipped.Exit: the opposite flip, always. Exits are never gated.FeaturesEfficiency-scaled bands that tighten in clean trends and loosen in chopAdaptive baseline that reacts only when the market is moving cleanlyChop filter with a late-entry window instead of a hard yes/no on each flipLong & Short, Long Only or Short Only modesEfficiency-tinted candles that fade to grey in chop and saturate in trendsGradient cloud from the trail to the candle body, stronger when ER is highSmall entry triangles on the bar where a position actually opensOptional dashboard showing trend, efficiency, band multiplier, entry gate and positionCustom colours for bull, bear and chopBuilt-in assumptions: 0.05% commission, 1 tick of slippage, 50% of equity per trade, no pyramidingTipsStart with the gate. Minimum Efficiency to Enter (default 0.25) matters most. Raise it for fewer, cleaner trades. Lower it to catch more of the trend.Match the length to the timeframe. Use a shorter Efficiency Length on lower timeframes for a quicker read, and a longer one on higher timeframes for a steadier read.Watch the candles. Grey candles mean the market is noisy, which makes it a bad time to trust a fresh flip.Try the band scales together. Widening the chop scale and tightening the trend scale makes the adaptation stronger. Pulling both toward 1.0 makes it behave more like a classic SuperTrend.Test more than one market and timeframe. Trend-following results vary a lot between trending and ranging instruments.Change position size in Properties. The default of 50% of equity is conservative, and you can set it to match your own risk.WarningsThis is a tool, not advice. Nothing here is financial advice, and past performance does not predict future results.Backtests flatter reality. Results depend on the symbol, timeframe, date range and cost assumptions. Check your own fees and slippage.It can still whipsaw. The filter reduces false flips in chop but does not eliminate them, especially in sideways markets.Exits are close-based. The strategy exits on a flip confirmed at bar close and fills at the next open, so gaps and fast moves can cost more than the trail suggests.Late entries start farther from the stop. A trade taken inside the late-entry window has less cushion than one taken on the flip bar.Don't over-optimise. Tuning many inputs to fit history makes a backtest look better without making the strategy more robust.Leverage and short selling carry extra risk. Check that the strategy settings suit your instrument and broker.

Browse all 5,900+ TradingView Pine Script strategies

View on TradingView