I need a TradingView Pine Script that tracks intraday trends—from the 1-minute chart up to the 60-minute—then generates clear buy and sell alerts. The core logic should be a straightforward trend-following approach, but I’d like it enhanced with at least one custom indicator you code directly into the script so everything sits in a single study. Here’s how I picture it working: • The script identifies the prevailing trend (feel free to use moving-average alignment, an ATR-based filter, or another reliable method you prefer). • When price confirms a new trend direction, an on-chart arrow prints and a real-time alert fires via TradingView’s alert() function. • A secondary custom visual—perhaps a colored background band or histogram—shows trend strength so I can gauge conviction at a glance. Critical details • Code must be written in Pine Script v5. • All inputs (lengths, multipliers, alert messages) should be parameters so I can tweak them without touching the source. • The study should plot cleanly on any intraday symbol between the 1-minute and 1-hour timeframes without repainting. Deliverable: the finished .pinescript file, commented clearly enough that I can understand or modify the logic later, plus a brief note explaining how to import, add alerts, and adjust settings.