Low Noise Moving Average
- Göstergeler
- Igor Ivankiv
- Sürüm: 1.0
Low Noise Moving Average (LowNoiseMA)
Traders who use moving averages (MAs) in their trading are well aware that in consolidation/flat zones, this tool often generates numerous false reversal signals with minor price changes. These fluctuations are essentially market noise. The LowNoiseMA indicator implements two approaches that effectively reduce the number of such false reversals, allowing for a clear and simple adjustment of the MA to any specific trading instrument and timeframe. These approaches can be used separately or simultaneously.
1st Approach: Filtering Absolute Changes in the MA
The first approach focuses on the absolute changes in the MA values. In consolidation zones, the price can reverse direction multiple times, causing the MA to reverse with a small amplitude of just a few pips (the minimum price change). These reversals usually do not signify a genuine trend change. To ignore this kind of MA direction "jitter," an MA reversal is only considered valid (true) when it exceeds a specified threshold in pips. This threshold is set by the indicator parameter, Points_to_flip. Let's examine this approach with an example.
Figure 1 shows the standard MA (included with the terminal) with rising periods colored cyan and falling periods colored magenta. On this chart, we can observe five (!) MA reversal points with the following values: 1.17704, 1.17701, 1.17703, 1.17695, 1.17699. If we replace the standard MA with LowNoiseMA using the parameter Points_to_flip=10 (Figure 2), we are left with only one meaningful reversal point – 1.17697. This single point effectively indicates the true trend change.
2nd Approach: Filtering Relative Changes in the MA
The second approach focuses on the relative change in the MA value (as a percentage). It defines a "reversal zone" (consolidation zone). A breakout from this zone signals either a continuation of the current trend or its reversal. For instance, if a potential reversal point from an uptrend to a downtrend is identified on the chart, the local maximum MA value (MA_max) is recorded. We then calculate (MA_max * Range_Flat_percent / 100) and subtract this value downwards to establish the lower boundary of the consolidation zone. A decisive cross below this level would confirm a trend reversal. As long as the MA value remains above this level (for a potential downtrend) or has not updated the MA_max to a new high (for a potential uptrend), the MA is colored gray to indicate the consolidation phase.
Figure 3 displays the coloring of a standard MA. The trend changes from up to down on July 3rd, with a reference point at 1.17870. Following this, the MA makes five attempts to reverse upwards, none of which materialize into a sustained move.
These attempts are characterized by a small upward change in the MA value. This common characteristic allows them to be easily filtered out using the LowNoiseMA indicator, as demonstrated in Figure 4 with the parameter Range_Flat_percent=0.05%.
This percentage-based approach is particularly useful for keeping price movements in perspective. When the price is in a narrow range, a chart's auto-scaling can exaggerate minor movements, potentially tempting a trader to make impulsive decisions. This filter helps mitigate that psychological effect.
Bar Processing Logic
The LowNoiseMA indicator calculates its values exclusively on completed bars. A bar is considered completed when the first tick of a new bar arrives at the terminal. The MA value for the last (still unformed) bar is colored yellow (Figure 5) to emphasize that its value is not final until the bar closes. This color can be changed to "None" in the parameters. If set to "None," the MA line will only be plotted for fully formed bars.
Compatibility with Expert Advisors
Beyond visual charting, the indicator is designed for seamless integration into Expert Advisors (EAs). When calling the indicator from an EA, the MA direction (-1 / 0 / +1 – falling/flat/rising) and the MA value for any specific bar are readily accessible.
Integration into Trading Systems
Trading systems typically rely on two or three moving averages and their crossover points. Using LowNoiseMA can provide additional, higher-probability conditions for filtering trade signals, as illustrated in Figure 6.
Notifications
The indicator supports three types of trader notifications (Alert, SendMail, SendNotification). These alerts are triggered by changes in the MA coloring, signaling either a change in the MA direction or entry into (or exit from) a consolidation zone.
Troubleshooting
If the indicator disappears from the chart upon attachment or during any chart operations, please check the "Experts" tab in the terminal's "Toolbox" window. A diagnostic message explaining the cause of the error may be logged there (Figure 7).
Indicator Parameters
The LowNoiseMA indicator offers the following input parameters for flexible configuration (Figure 8):
| Parameter | Description |
|---|---|
| InpPeriod | Moving Average period. |
| MaMethod | MA calculation method (e.g., SMA, EMA, SMMA). |
| PriceType | Price type used for MA calculation (e.g., Close, Open, High, Low). |
| Points_to_flip | The minimum price movement (in pips) required to confirm a true MA reversal. |
| Range_Flat_in_percent | The width of the flat/consolidation zone, expressed as a percentage of the price. |
| AlertON | Enable pop-up alert notifications with sound. |
| EMailON | Enable e-mail notifications. |
| PushON | Enable push notifications to the mobile terminal via MetaQuotes ID. |
| Print_online_to_Logfile | Enable recording of events (MA color changes) to a log file. |
I would be grateful for your feedback and reviews on the application of my indicator.
Good trades!
