OPEN-SOURCE SCRIPT
Zero Lag Moving Average

This indicator is a trend detection tool that highlights significant momentum shifts with reduced lag. It uses two smoothed moving averages—fast and medium ZLEMAs—optionally enhanced with a Kalman filter to reduce noise. The indicator defines a bullish trend when the price is above both ZLEMAs, and bearish when it is below both. Rather than signaling every crossover, it focuses on trend changes, triggering buy or sell signals only when the trend flips (e.g., from bearish to bullish) and confirms those shifts with two filters: rising volume (above the 20-bar average) and a strong trend based on the ADX indicator. Visual features include optional candle coloring to reflect trend direction and signal markers (triangles) plotted only during a user-defined trading session. This setup helps traders act only on confirmed, high-quality momentum shifts, reducing false positives in low-volume or ranging markets.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
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.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
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.