OPEN-SOURCE SCRIPT
NonLag MA

The Non-Lag Moving Average (MA) is a technical analysis indicator designed to track price trends with significantly less lag than traditional moving averages like the SMA or EMA.
Its primary purpose is to provide a smoother, more responsive representation of the current price direction. It achieves this by using a complex, adaptive filtering algorithm—often involving trigonometric functions (like the cosine function in the code you provided)—to assign weights to past price data. This sophisticated calculation allows it to stay closer to the price action, aiming to give earlier and more reliable trend signals.
Traders use the Non-Lag MA to:
Identify Trend Direction: The slope and color of the indicator line clearly signal whether the market is in an uptrend (rising) or a downtrend (falling).
Generate Crossover Signals: Like other moving averages, a faster Non-Lag MA crossing above a slower one can indicate a buy signal, while a cross below can signal a sell.
---
Just another publicly available indicator from MT5 translated.
Its primary purpose is to provide a smoother, more responsive representation of the current price direction. It achieves this by using a complex, adaptive filtering algorithm—often involving trigonometric functions (like the cosine function in the code you provided)—to assign weights to past price data. This sophisticated calculation allows it to stay closer to the price action, aiming to give earlier and more reliable trend signals.
Traders use the Non-Lag MA to:
Identify Trend Direction: The slope and color of the indicator line clearly signal whether the market is in an uptrend (rising) or a downtrend (falling).
Generate Crossover Signals: Like other moving averages, a faster Non-Lag MA crossing above a slower one can indicate a buy signal, while a cross below can signal a sell.
---
Just another publicly available indicator from MT5 translated.
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.