Moving Average Trend Sniper

Moving Average Trend Sniper

1. Introduction

The Moving Average Trend Sniper indicator is designed to detect trend movements more accurately than traditional moving averages. This indicator goes beyond simple price averaging: it integrates adaptive volatility-based smoothing, dynamic trend filters, and slope analysis to deliver a clearer picture of market direction.

Its main goal is to provide a smart and visual trend-following tool, highly responsive to significant price shifts while filtering out noise during sideways markets.

2. Indicator Logic and Foundation

This indicator is built upon a solid base of advanced technical analysis concepts. Its core logic combines:

  • Adaptive moving averages, which adjust to volatility and structural price changes.
  • Directional filters based on the slope angle (derived from ATR) to dynamically decide whether to prioritize highs or lows.
  • Chebyshev-like smoothing, which adapts based on price impulses, reacting more quickly when significant shifts occur and less when the market is stable.
  • Dynamic envelope bands, calculated from a modified ATR, serving as visual references for support/resistance zones during trends.

3. Indicator Components

Here’s a breakdown of the indicator’s main components:

• Chebyshev-like adaptive smoothing

This smoothing mechanism adapts only when structural changes are detected in recent highs or lows. If not enough bars are available, it falls back to using the close price.

• Slope angle and dynamic source

The indicator calculates a slope normalized by ATR and converts it into an angle. Based on the angle’s sign, it chooses the data source: average of highs or lows.

• Modified ATR

A progressively accumulated ATR (atrema) is used to stabilize volatility calculations over time. This value is key to defining the filter’s offset and band width.

• MATS trend filter

This is the core of the trend detection logic. The filter updates conditionally depending on whether the movement is strong enough. It doesn’t blindly follow price – it demands confirmation.

• Envelope bands

Plotted above and below the MATS line, these bands are based on ATR and help to visually capture zones of potential support and resistance within trends.

• Dynamic coloring

The indicator changes color depending on whether price is above or below the trend filter, giving a quick visual cue of the prevailing trend direction.

4. Settings and Custom Parameters

The indicator includes several tunable parameters for greater flexibility:

  • length (default: 30): main smoothing period. Higher values slow the indicator down.
  • atrMult (default: 0.5): ATR multiplier for the envelope bands. Higher values create wider bands.
  • wildersPeriod and atrPeriod: automatically calculated from length.

Tip: for highly volatile instruments or lower timeframes, consider using a smaller length (10–20). For daily or weekly charts, keeping it at 30 or even higher is more effective for capturing long-term trends.

5. Practical Use and Advantages

This indicator is especially useful for:

  • Trend-following in medium to long-term timeframes.
  • Filtering false signals during consolidations thanks to its adaptive directional logic.
  • Quickly identifying trend shifts via color changes.
  • Defining dynamic zones of support/resistance with the envelope bands.

Compared to a classic moving average (like EMA or SMA), the Trend Sniper adapts its behavior to market conditions, providing better-informed signals and reducing lag in evolving markets.

6. ProRealTime Indicator Code

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
Register or

Likes

avatar avatar avatar
Related users ' posts
roccafragius Thank you so much, for my point of view very useful!!!
NicoGB67 Excelente trabajo!!
Jrmjrm Bonsoir est-il possible d'avoir cet indicateur, mais à la place du Wilder Average, utiliser ...
Iván Hi! just change line13 for this: showsignals=1
Quino Hi Excellent indicator as usual. Just 2 questions: Why LenH and LenL = 15 as Len could be...
Iván Hi! good question. This is a code request traslation from other platform. I took same inputs...
Gaspare Grazie Ivan, ottimo indicatore posso chiedere, per favore, una strategia che apre posizio...
Iván thanks! maybe I could test it
Iván
7 months ago
Madrosat Bonjour ivan Quelle différence il y a t il entre Extra trend et ultra trend lequel est le p...
MaoRai54 dear Ivan, it seems to be very interesting but please clarify what are all the lines I see i...
Iván Hi! you have the answer in the last line of code... MacdMiddle as "histo" style(histogra...
kats Le Top , a utiliser avec le nuage violet et alerte TN pour plus de précision.
Iván Hi! yes. You can ask for it here: https://www.prorealcode.com/free-code-conversion/
roccafragius Thank you so much Ivan! I created this request in english Translate from TradingView Indicat...
ipbvba Hello, Is it possible to have a screener for the various buy and sell signals?
Regisnew très bel indicateur merci
Jean2139 Bonjour Yvan, Merci pour ton indicateur que je trouve très intéressant. Je suppose que tu ...
Suffi Hier eine kleine Korrektur: //-----Inputs-----------------------------------------// MALengt...
kats Bonjour, J'ai une question etes vous trader? Je m'explique , j'ai téléchargé tous les indi...
Faisalx Hola Ivan. Thanks for your great job. I would appreciate if you have look at my request http...
roccafragius Thank you for all these useful information!! Very great job Ivan! THank you so much
geroniman Merci Ivan, super travail. On peut toujours compter sur toi pour apporter des innovations su...
Stenozar Ciao IVAN , mi da errore per la riga 49 "print tema low"; puoi suggerirmi la modifica da met...
Iván Avete provato a scaricare il file .itf?
AndyB72 Caricato ora sulla V12, nessun errore.
Iván Allora crei un nuovo post. Lo aspetterò.
Stenozar Ciao Ivan, ho inserito il post con la richiesta di traduzione. Se puoi vedere, grazie!
Iván perfect!
kats BONSOIR c bon merci j ai trouve ce weekend merci de votre reponse cdlt
the_giorgio Hi, nice work I would like to understand something about prorealtime code. With your ...
Iván Hello. When you use the drawcandle() instruction then in the configuration window you add ...
Gaspare Ciao Ivan si puo' inserire una strategia su questo indicatore per ottimizzare le variabil...

Top