Skip to main content

GKYZ-Filtered Non-Linear Regression MA: A Volatility-Adaptive Trend Indicator That Cuts Through Noise

· 12 min read

I've tested dozens of moving averages over the years, and here's what always bothered me about traditional regression-based smoothers: they respond to every little price wiggle, even the ones that don't matter. In choppy markets, that means constant color changes, endless whipsaws, and a lot of frustration trying to figure out which signals are real.

The GKYZ-Filtered Non-Linear Regression MA (GKYZFNLRMA) tackles this problem by adding a volatility-based filter to a quadratic regression calculation. Instead of reacting to every price movement, it uses the Garman-Klass-Yang-Zhang volatility estimator to filter out changes that are smaller than the current volatility threshold. The result is a smoother trend line that still catches real moves while ignoring the noise that trips up simpler indicators.

After testing this on various markets and timeframes, I've found it particularly useful in situations where standard moving averages generate too many false signals—volatile crypto pairs, choppy consolidation phases, and ranging markets where trend followers usually get eaten alive.

GKYZ-Filtered Non-Linear Regression MA Indicator

What is GKYZ-Filtered Non-Linear Regression MA?

The GKYZFNLRMA combines two powerful concepts: non-linear (quadratic) regression and GKYZ volatility filtering. Let me break down each component.

Non-Linear Regression: Unlike simple or exponential moving averages that just weight price values, non-linear regression fits a curved line (specifically a quadratic curve) through recent price data. This curved fit captures trend acceleration and deceleration more naturally than linear methods. When price is accelerating into a trend, the quadratic curve adapts to that curvature instead of lagging behind like a straight-line approximation would.

GKYZ Volatility Estimator: The Garman-Klass-Yang-Zhang estimator is an advanced volatility measurement that uses all four price points—open, high, low, and close. This makes it more accurate than simple close-to-close volatility calculations. The formula incorporates overnight gaps, intraday range, and open-to-close movement to produce a volatility estimate that reflects actual market behavior.

The Filter Mechanism: Here's where it gets interesting. The GKYZ filter ignores price changes that are smaller than the calculated volatility threshold. If the market moves less than what the volatility filter expects, it treats that movement as noise and doesn't update the indicator value. Only when price moves more than the volatility threshold does the indicator respond.

The indicator outputs several useful components:

  • GKYZFNLRMA Line: The filtered regression value that overlays on price
  • Buy Signal: Triggered when the trend direction shifts from bearish to bullish
  • Sell Signal: Triggered when the trend direction shifts from bullish to bearish
  • Trend Direction: Color-coded (green for uptrend, red for downtrend) for easy visual identification

This combination creates an indicator that stays with trends during strong directional moves but refuses to get whipsawed during the sideways chop that destroys most trend-following systems.

What is Pineify?

Pineify is a visual Pine Script editor that lets you build and customize TradingView indicators without writing code. If you've ever wanted to tweak indicator settings, combine multiple indicators, or create custom strategies but didn't want to learn programming, Pineify handles the technical side for you.

Pineify Website

The platform includes a library of pre-built indicators (including the GKYZ-Filtered Non-Linear Regression MA), strategy building tools, and backtesting capabilities. You work visually—dragging components, adjusting parameters with sliders, and seeing results on live charts—while Pineify generates the underlying Pine Script code.

The Best Pine Script Generator

How to Add GKYZ-Filtered Non-Linear Regression MA to TradingView

Adding the GKYZFNLRMA to your charts through Pineify takes just a few minutes:

  1. Open the Pineify Editor and create a new indicator project
  2. Search for "GKYZ-Filtered Non-Linear Regression MA" or "GKYZFNLRMA" in the indicator library
  3. Add it to your workspace—you'll see default settings (Period: 60, Filter Multiple: 0.5, Filter Period: 15)
  4. Customize the visual settings: uptrend line color, downtrend line color, whether to show signals, and bar coloring options
  5. Click "Deploy to TradingView" to send the indicator directly to your account
How to search for and add indicator pages in the Pineify editor

Once deployed, you'll find it in your TradingView indicators list under "My Scripts." The indicator overlays directly on price, with the line changing color based on trend direction. Buy signals appear as yellow triangles below bars, and sell signals show as purple triangles above bars.

You can also configure whether to apply the GKYZ filter to the input price, the output, or both. This flexibility lets you tune the noise reduction to match your specific trading needs.

How to Use GKYZ-Filtered Non-Linear Regression MA

The GKYZFNLRMA works well as both a trend identification tool and a signal generator. Here's how to apply it in practice:

Strategy #1: Trend Direction Trading

The most straightforward approach uses the indicator's color changes as your primary signal:

  • Long Entry: Enter when the GKYZFNLRMA line turns from red to green (bullish trend confirmed)
  • Short Entry: Enter when the line turns from green to red (bearish trend confirmed)
  • Stop Loss: Place stops beyond the recent swing high (for shorts) or swing low (for longs)
  • Take Profit: Trail your stop using the indicator line or use a fixed risk-reward ratio

Because the volatility filter reduces false color changes, you get fewer entries overall—but those entries tend to be more reliable than what you'd get from a standard moving average.

Strategy #2: Signal Confirmation with Price Action

The buy and sell triangles mark potential reversal points, but they're most effective when confirmed by price action:

  • Wait for the buy signal (yellow triangle below bar)
  • Confirm with a bullish candlestick pattern (engulfing, hammer, or strong close above the indicator)
  • Enter on the next bar's open with stops below the signal bar's low
  • For sell signals, reverse the process

I've found this confirmation approach reduces false starts during choppy periods when the indicator might generate signals that don't follow through.

Strategy #3: Dynamic Support and Resistance

During established trends, the GKYZFNLRMA line often acts as dynamic support (in uptrends) or resistance (in downtrends):

  • In an uptrend (green line), watch for price pullbacks to touch or approach the indicator line
  • Enter long when price bounces off the line with a bullish candle
  • Stop loss goes below the indicator line
  • This approach catches trend continuation moves without chasing after extended runs

Strategy #4: Multi-Timeframe Confirmation

Use a higher timeframe GKYZFNLRMA for overall trend direction and a lower timeframe for entries:

  • Daily GKYZFNLRMA determines whether you're looking for longs (green) or shorts (red)
  • 4-hour or 1-hour signals trigger actual entries in the direction of the daily trend
  • This filter keeps you on the right side of the bigger picture while timing entries more precisely

The volatility filtering really shines in volatile markets. Where standard moving averages would generate constant crossovers during crypto pumps and dumps, the GKYZFNLRMA filters out the noise and stays with the underlying trend.

Best GKYZ-Filtered Non-Linear Regression MA Settings

The default settings work as a solid starting point, but different trading styles benefit from different configurations:

Scalping (1-15 minute charts):

  • Period: 30-40
  • Filter Multiple: 0.3-0.4
  • Filter Period: 10
  • Filter Price: true
  • Filter Output: true

Lower period settings make the indicator more responsive for quick trades. The lower filter multiple lets more price action through, which you need for short-term trading where you can't afford to miss smaller moves.

Day Trading (15-60 minute charts):

  • Period: 50-60 (default)
  • Filter Multiple: 0.5 (default)
  • Filter Period: 15 (default)
  • Filter Price: true
  • Filter Output: true

The defaults work well for intraday trading. This balances responsiveness with noise filtering for typical day trading timeframes.

Swing Trading (4-hour to Daily charts):

  • Period: 60-80
  • Filter Multiple: 0.6-0.7
  • Filter Period: 20
  • Filter Price: true
  • Filter Output: true

Longer periods and higher filter multiples create a smoother indicator that focuses on major swings rather than intraday fluctuations. The higher filter setting demands larger moves before updating, which keeps you in winning trades longer.

Position Trading (Daily to Weekly charts):

  • Period: 80-100
  • Filter Multiple: 0.8-1.0
  • Filter Period: 25-30
  • Filter Price: true
  • Filter Output: true

For longer-term positions, maximize the filtering to focus only on significant trend changes. This configuration tolerates larger drawdowns in exchange for staying with major trends.

Trading StylePeriodFilter MultipleFilter PeriodBest For
Scalping30-400.3-0.410Quick entries, frequent signals
Day Trading50-600.515Balanced responsiveness
Swing Trading60-800.6-0.720Major swing captures
Position Trading80-1000.8-1.025-30Long-term trend following

Filter Options Explained:

  • Filter Price: When enabled, applies the GKYZ filter to the input price before regression calculation. This pre-smooths the data and reduces noise in the source.
  • Filter Output: When enabled, applies the filter to the final regression output. This smooths the indicator line itself and reduces color-change whipsaws.

For maximum noise reduction, keep both enabled. For faster response at the cost of more signals, try disabling one or both filters.

How to Backtest GKYZ-Filtered Non-Linear Regression MA

Before trading real money with any indicator, backtesting gives you confidence in your approach. Pineify's strategy builder lets you create complete trading systems based on the GKYZFNLRMA:

Basic Trend-Following Strategy Setup:

  • Entry Condition (Long): GKYZFNLRMA Buy Signal equals true
  • Entry Condition (Short): GKYZFNLRMA Sell Signal equals true
  • Take Profit: 2-3% for day trading, 5-8% for swing trading
  • Stop Loss: 1-1.5% for day trading, 2-4% for swing trading
  • Trailing Stop: Move stop to breakeven after reaching 1:1 risk-reward

Testing Different Market Conditions:

Run your backtest across different market phases:

  • Strong trending periods (to verify the indicator catches major moves)
  • Choppy consolidation periods (to check how well the filter reduces false signals)
  • High volatility events (to see if the adaptive filtering adjusts properly)

Metrics to Watch:

  • Win Rate: The GKYZFNLRMA's filtering should improve win rate compared to unfiltered alternatives
  • Profit Factor: Look for values above 1.5 for a robust edge
  • Maximum Drawdown: Ensure this stays within your risk tolerance
  • Average Trade Duration: Longer durations typically indicate the filter is working to keep you in trades

Optimization Tips:

  1. Start with default settings and establish a baseline performance
  2. Adjust one parameter at a time (Period first, then Filter Multiple, then Filter Period)
  3. Avoid over-fitting to historical data—if settings only work on one specific backtest period, they're probably curve-fitted
  4. Test across multiple instruments to verify robustness

The Pineify backtester shows equity curves, trade-by-trade breakdown, and key statistics. This lets you compare different parameter combinations side by side and find settings that work for your specific market and timeframe.

Position sizing matters too. Start with 1-2% of capital per trade to manage risk while you validate your approach. Even indicators with strong historical performance can have drawdown periods, and proper position sizing keeps those drawdowns survivable.

FAQs

What makes GKYZ volatility better than other volatility measures?

The Garman-Klass-Yang-Zhang estimator uses all four price points (open, high, low, close) instead of just closing prices. This captures intraday volatility and overnight gaps more accurately. For the filter mechanism, having a more accurate volatility estimate means the threshold is properly calibrated—you filter out actual noise rather than filtering too much or too little.

Is the GKYZFNLRMA suitable for cryptocurrency trading?

Yes, and I've actually found it works particularly well for crypto. The volatile nature of crypto markets creates exactly the kind of noise that the GKYZ filter is designed to handle. Just consider using slightly higher filter multiples (0.6-0.8) to account for crypto's larger average moves compared to traditional markets.

How does this compare to a standard Linear Regression indicator?

Linear regression fits a straight line through price data. Non-linear (quadratic) regression fits a curve, which captures trend acceleration and deceleration better. Add the volatility filter on top, and you get something that responds to meaningful trend changes while ignoring random noise that linear regression would react to.

Can I combine this with other indicators?

Absolutely. The GKYZFNLRMA works well as a trend filter combined with momentum oscillators. For example, only take GKYZFNLRMA buy signals when RSI is above 50, or combine it with volume confirmation. Pineify makes it easy to add these additional conditions and backtest the combined system.

What's the best approach when the indicator gives a signal that fails?

Failed signals happen with every indicator—the filter reduces them but doesn't eliminate them. Use stop losses consistently (I recommend placing them beyond recent swing points or a multiple of ATR below/above entry). When you get stopped out, don't second-guess the system. The long-term edge comes from letting winners run while cutting losers quickly.

Should I use Filter Price, Filter Output, or both?

For most applications, keeping both enabled provides the best balance of smoothing and responsiveness. If you find the indicator is too slow for your style, try disabling Filter Price while keeping Filter Output. If you want even faster response but can tolerate more signals, disable both—though at that point, you're essentially using a standard non-linear regression without the GKYZ benefit.