Skip to content
All library documents

Combining TRIX and Williams Percent Range Signals in an MQL5 Expert Advisor

Article MQL5 articles

Summary

This article develops ten candidate signal patterns that combine TRIX, a triple-smoothed momentum oscillator, with Williams Percent Range (WPR), which locates price within its recent high-low range. The examples use zero-line crossings, oscillator extremes, pivots, divergence, and local highs or lows to formulate potential entries. Bullish setups generally look for improving TRIX momentum alongside WPR recovery from an oversold region; bearish setups reverse those conditions. The author also discusses confirmation filters such as price levels, volume, trend measures, and candle patterns.

The examples are implemented as custom signals for the MQL5 Wizard. Testing uses CHF/JPY on a four-hour chart, with 2023 for training or optimization and 2024 as a forward-walk period. The document says only patterns 1, 4, and 5 forward-walked, while the final pattern produced no trades because its conditions were too restrictive. Indicator periods were shortened to three to generate activity in the limited sample, rather than using more typical settings. Results are therefore narrow and do not establish robustness; the article warns that both indicators can give false signals, particularly in choppy or strongly trending markets.

Key ideas

  • TRIX measures the rate of change in a triple-smoothed exponential average, while WPR locates price within a recent range.
  • The proposed patterns combine TRIX direction or divergence with WPR thresholds, pivots, and extremes.
  • The MQL5 implementation packages the patterns as custom signals for Wizard-assembled expert advisors.
  • Testing used CHF/JPY on four-hour bars, with one year for optimization and the following year for forward walking.
  • Only three patterns were reported to forward-walk, and the short indicator periods and limited sample constrain the evidence.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.