Trix With Signal Line
A single EMA still lets short cycles through - insignificant chop shows up as noise on top of the real trend. TRIX (Jack Hutson, Technical Analysis of Stocks & Commodities, early 1980s) tackles this by chaining the SAME EMA period three times in a row: EMA of close, then EMA of that EMA, then EMA of that. Each pass filters out progressively shorter cycles, so the triple-smoothed line is a genuinely cleaner trend measure than any single EMA of the same period could be. TRIX itself is not the level of that triple-smoothed line - it is its bar-to-bar percent RATE OF CHANGE: (EMA3 - EMA3[1]) / EMA3[1] * 100. Plotting the rate of change rather than the level is what makes TRIX oscillate around zero instead of trending with price, the same way MACD or any other zero-centred momentum oscillator does. A signal line (an EMA of the TRIX line) is added so a crossover is available as a trigger rather than only the zero-line cross the original method reads. Notes and limitations - Non-repainting: every value depends only on closed bars up to and including its own bar. - Recomputes the full visible history from bar 0 on every call rather than incrementally updating from prev_calculated, because the three chained EMA recursions all depend on their entire prior history; this is deliberate, matching the other chained-EMA indicators in this catalogue. - Needs roughly 3 * InpPeriod bars of history before the triple-smoothed line has genuinely settled - early bars are technically plotted but are not yet a reliable reading; feed it a chart with ample history. - The very first (oldest) bar in the loaded history has no prior triple-smoothed value to rate-of-change against, so TRIX for that bar is defined as 0.0 rather than left undefined.
Indicator · MT4 · v1.0 · Free
About Trix With Signal Line
Trix With Signal Line is an indicator for MetaTrader 4. It has 2 settings, such as Period and Signal period. MQL source code included.
Files in the download: TrixWithSignal.mq4, TrixWithSignal.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Period | 14 | EMA period applied three times in a row |
| Signal period | 9 | EMA period applied to the Trix line for the signal line |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Moving Average · Buy/Sell Arrows · Trend · MT4 Indicator · MQL4 Source Code