Special thanks to LonesomeTheBlue for the original concept and inspiration for this strategy.
This strategy leverages the Donchian Channel to determine both the main market trend and local trends. The result is a visually appealing trend ribbon, providing clear entry and exit signals based on trend alignment.
Features Donchian Channel:
A classic indicator that tracks the highest high and lowest low over a specified period. Main Trend: Determines the overall market direction based on price relative to the Donchian Channel. Local Trend: Identifies smaller, shorter-term trends within the main trend. Trend Ribbon Visualization:
Green shades for uptrends, red shades for downtrends. Lighter colors indicate local trends opposing the main trend, while darker colors show alignment. Entry and Exit Logic Long Entry:
When the main trend indicates an uptrend. Short Entry:
When the main trend indicates a downtrend. Exit Logic:
Positions are closed when the trend reverses (i.e., a switch from an uptrend to a downtrend or vice versa). Visualization Trend Ribbon: Multiple columns stacked to form a ribbon, with varying shades based on local and main trend alignment. Customization Donchian Channel Period: Default: 20 bars. Adjustable to fit different market conditions and timeframes. This strategy is perfect for traders looking for a trend-following approach with clear visual cues for market direction and entry/exit signals.
In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.