TRIX Trendline Indicator for MT4 and MT5

TrueTL Triple Exponential Average (TRIX) Trendline indicator calculates the TRIX values and draws trendlines in the indicator window. It detects trendline breakout and approach events, and provides optional arrows, vertical lines, alerts, multi-timeframe calculation, and EA-ready signal buffers.

The indicator is built for traders who want TRIX trendline structure without drawing every line manually. Breakout and approach signals can be used visually, through alerts, or from an Expert Advisor.

Key features:

  • Works in both MetaTrader 4 and MetaTrader 5.
  • Finds and draws Triple Exponential Average (TRIX) trendlines automatically in the indicator window.
  • Detects trendline breakout and approach events on the calculated indicator lines.
  • Calculates and plots TRIX Fast (or dynamic) and TRIX Slow (or dynamic) with configurable calculation inputs.
  • Multi-timeframe support with selectable interpolation modes.
  • Works with normal candle charts and offline charts such as Renko or block charts.
  • Triangle mode can keep the chart cleaner by drawing only two trendlines.
  • 5 configurable signal slots. Each slot has its own iCustom buffer, arrow colors, and alert timing.
  • Signal types include indicator direction/level events, trendline breakout, and approach-to-trendline events when supported by the selected indicator.
  • Alerts can be sent by popup, push notification, email, sound, Telegram, CSV file, and chart pictogram.
  • Force refresh and smart HTTP/cache modes help keep visual backtesting and repeated testing faster (more info).
  • All trendline styles, signal arrows, indicator line styles, and the show/hide button are controlled from the Inputs tab.

EA and iCustom usage:

The indicator is ready for Expert Advisor integration through iCustom(). The non-signal buffers return the calculated TRIX line values. The signal buffers return the five user-configurable signal slots, so an EA can read only the events you select in the inputs.

Signal slots are independent. For example, Signal 1 can watch a breakout or approach event, while Signal 2 and Signal 3 can watch different level, direction, or line events.

  • Buffer 0: TRIX Fast (or dynamic) value buffer.
  • Buffer 1: TRIX Slow (or dynamic) value buffer.
  • Buffer 2: Signal 1 buffer. Returns 1 or -1 based on the selected Signal 1 setting.
  • Buffer 3: Signal 2 buffer. Returns 1 or -1 based on the selected Signal 2 setting.
  • Buffer 4: Signal 3 buffer. Returns 1 or -1 based on the selected Signal 3 setting.
  • Buffer 5: Signal 4 buffer. Returns 1 or -1 based on the selected Signal 4 setting.
  • Buffer 6: Signal 5 buffer. Returns 1 or -1 based on the selected Signal 5 setting.

TRIX Trendline Indicator Settings Panel
TRIX Trendline Indicator Settings Panel


Indicator Inputs

  • Version: shows the installed indicator version. If support asks for your version, this is the value to check.
  • Username (without spaces, case sensitive): enter the username you received after purchase. After the first successful activation, you can usually leave it unchanged in other instances (about our ex4 protection).
  • Auto refresh: controls when server-side trendline objects are refreshed. Available options are:
    Off
    On (auto refresh depending on the last closed bar)
    Force refresh (force refresh if chart scrolling) More info.
  • Smart HTTP request: controls how often the indicator sends calculation requests. Available options are:
    Off - HTTP request on every bar
    Estimate - skip if 99% sure no new objects (faster)
    Cache - build a cache file and reuse saved results if available (fastest)
    Cache reset - fully rebuild the cache file (this symbol + period + settings)
  • Signal scan lookback bars (0=off): controls how many recent bars are rescanned for live signal buffers and visual signal drawing. 0 turns this scan off.
  • Fast TRIX period: sets this calculation parameter for the TRIX formula. Default: 5
  • Slow TRIX period: sets this calculation parameter for the TRIX formula. Default: 30
  • Applied price: selects the price series used by the indicator calculation.
  • TRIX bar shift: shifts the indicator calculation by the selected number of bars. Most users should keep this at 0. Default: 0
  • TRIX timeframe: selects the timeframe used for the TRIX calculation. It can use the current chart timeframe, fixed timeframes, or relative lower/higher timeframe presets.
  • MTF on higher TF only: turns this option on or off. Default: false
  • MTF Interpolation mode: controls how values from another timeframe are placed on the current chart. Available options are:
    Off (step mode)
    Linear (average smoothing)
    Smooth (sine ease in-out)
    Weighted (closer bars have more weight)
    SMA (period = 2 × ratio)
  • Maximum bars to calculate: limits how many bars are calculated. A lower value can improve performance. A higher value gives more history. Default: 2000
  • Show in the indicator window: controls the label shown in the indicator window. Use Allow multiple instances if you want to run more than one copy on the same chart. Available options are:
    Only "TrueTL" (2 indicators doesn't work on same chart)
    Indicator name (2 indicators doesn't work on same chart)
    Indicator name + settings
    Indicator name + settings + values
    Indicator name + values (2 indicators doesn't work on same chart)
  • Allow multiple instances (separate settings string): allows several TRIX Trendline indicators on the same chart by giving each instance its own settings identity.
  • Triangle mode (draw only 2 trendlines): draws only two trendlines. Use it when you want a simpler, cleaner view.

Levels Settings

  • Show levels: shows or hides the indicator reference levels in the indicator window.
  • Level (zero line): sets the reference level used for display, coloring, filters, and level-cross signals. Default: 0
  • Color of indicator levels: sets the color of the indicator level lines.
  • Style and width of indicator levels: sets the style and width of the indicator level lines. Available options are:
    Solid (width 1-5)
    Dash (width 1)
    Dot (width 1)
    DashDot (width 1)
    DashDotDot (width 1)

Trendline Settings

  • Trendline showing mode: chooses which trendline objects remain visible. Available options are:
    Show all trendlines
    Show all trendlines without labels
    Show only upward trendlines
    Show only upward trendlines without labels
    Show only downward trendlines
    Show only downward trendlines without labels
  • Trendline color: sets the default trendline color.
  • Trendline style/width (Off = hide): sets the line preset used for trendlines. Off hides trendlines. Available options are:
    Off
    Solid (width 1-5)
    Dash (width 1)
    Dot (width 1)
    DashDot (width 1)
    DashDotDot (width 1)
  • Cut trendline endings at breakout: shortens trendlines at the breakout point, so the chart shows where the break happened more clearly.
  • Draw trendlines in the background: places drawn objects behind candles and other chart drawings.
  • Status notification corner: sets where chart-side status messages are shown.

Signal Settings

  • Approach distance (TRIX units): sets how close the indicator line must come to a drawn trendline before an approach signal can trigger. Default: 0.0001
  • Vertical line on/off and size/style: draws an optional vertical line on signal bars and controls its style and width. Available options are:
    Off
    Solid (width 1-5)
    Dot
    Dash
    Dash-Dot
    Dash-Dot-Dot
  • Arrow on/off and size: draws signal arrows on the main chart and controls their size. Available options are:
    Off
    Size 1-8
  • Arrow distance from candle: controls how far arrows are placed from candles. ATR-based distance adapts to volatility. Point-based distance uses fixed point values. Available options are:
    Close (1x ATR)
    Medium (2x ATR)
    Far (3x ATR)
    Close (20 points)
    Medium (50 points)
    Far (100 points)
  • Up arrow code (Wingdings): sets the Wingdings symbol for bullish/up signal arrows. Default: 233
  • Down arrow code (Wingdings): sets the Wingdings symbol for bearish/down signal arrows. Default: 234
  • Signal 1-5 Up color / Signal 1-5 Down color: assign separate bullish/up and bearish/down colors to each signal slot. This is useful when several signals are active at the same time.

Alert Settings

  • Alert on new trendlines: sends an alert when a new trendline is detected. This works independently from the five signal slots.
  • Alert for Signal 1-5: sets alert timing separately for each signal slot. Available options are:
    Off
    After candle closed
    Before candle is closing
    Both
  • Trendline objects to alert for: selects which chart objects are monitored by trendline breakout and approach alerts. Available options are:
    TrueTL drawn trendlines only
    All trendlines and horizontal lines
    Selected trendline colors only
  • Trendline color filter (for ao_selected_colors): defines the monitored object color when alerts are set to selected colors.
  • Alert interval limit (minutes, 0=no limit): prevents repeated alerts from firing too often. 0 disables the interval limit.
  • Shortcut key to send test alert: lets you send a test alert from the chart with a keyboard shortcut. Available shortcut values are Off, 0-9, and A-Z.
  • Alert start time: sets the daily start time for alerts. 00:00 to 00:00 means alerts are allowed all day.
  • Alert end time: sets the daily end time for alerts. 00:00 to 00:00 means alerts are allowed all day.
  • Message identifier: adds a short label to alert messages. This is useful when several charts, symbols, or indicator instances are running.
  • Alert via email: enables this MetaTrader alert channel.
  • Alert via push notification: enables this MetaTrader alert channel.
  • Alert via popup window: enables this MetaTrader alert channel.
  • Alert with sound: enables this MetaTrader alert channel.
  • Sound file: selects the sound file used by sound alerts. Default: "Tick.wav"
  • Telegram Notifications: enables Telegram delivery.
  • Token: sets the Telegram bot token.
  • Chat ID: sets the destination Telegram chat ID.
  • Pictogram alert: shows a chart-corner symbol that changes with the latest alert direction.
  • Pictogram corner: sets the pictogram corner.
  • Pictogram X: sets the pictogram horizontal position. Default: 15
  • Pictogram Y: sets the pictogram vertical position. Default: 45
  • Pictogram size (font): sets the pictogram font size. Default: 24
  • Pictogram symbol (Wingdings code): sets the Wingdings symbol used by the pictogram alert. Default: 71
  • Pictogram UP color: sets the bullish/up pictogram color.
  • Pictogram DOWN color: sets the bearish/down pictogram color.
  • Pictogram neutral color: sets the neutral pictogram color.
  • Write alert to CSV file: writes alerts to a CSV file in the platform files folder for later review or external automation.

Color and Style Settings

  • Color mode: controls how the indicator line colors are selected. Available options are:
    Simple color
    Cross (Main vs Signal)
    Only direction
    Direction with one level (Mid or 0)
    Only level
  • Fixed histogram (color only): turns this option on or off. Default: false
  • Draw Main line in histogram mode: displays the main line as a histogram instead of a line.
  • Color 1-4 of Main line: set the possible color states for the main line. The active color depends on the selected Color mode.
  • Style and width of Main line: selects the line style and width for the main line. Available options are:
    Solid (width 1-5)
    Dash (width 1)
    Dot (width 1)
    DashDot (width 1)
    DashDotDot (width 1)
  • Draw Signal line in histogram mode: displays the signal line as a histogram instead of a line.
  • Color 1-4 of Signal line: set the possible color states for the signal line. The active color depends on the selected Color mode.
  • Style and width of Signal line: selects the line style and width for the signal line. Available options are:
    Solid (width 1-5)
    Dash (width 1)
    Dot (width 1)
    DashDot (width 1)
    DashDotDot (width 1)

Show/Hide Button Settings

  • Enable show/hide button: enables the chart button used to show or hide the indicator without removing it from the chart (more info).
  • Shortcut for button: controls the keyboard shortcut for the show/hide button. Available shortcut values are Off, 0-9, and A-Z.
  • Apply for all TrueTL Indicators on the chart: controls whether the button affects only this instance or all TrueTL indicators on the chart.
  • Adjust the corner of button: sets the button corner on the chart.
  • Adjust the text of button: sets the button caption. Default: "TRIX TL"
  • Adjust the text's font of button: sets the button font. Default: "Corbel"
  • Adjust the text's size of button: sets the button text size. Default: 9
  • Adjust the text's color of button: sets the button text color.
  • Adjust the background color of button: sets the button background color while visible.
  • Adjust the background color of button when hidden: sets the button background color while hidden.
  • Adjust the border color of button: sets the button border color.
  • Adjust the coordinate X of button: sets the button X coordinate. Default: 20
  • Adjust the coordinate Y of button: sets the button Y coordinate. Default: 40
  • Adjust the width of button: sets the button width. Default: 70
  • Adjust the height of button: sets the button height. Default: 20
  • Button DPI scale (auto = Windows DPI): controls the button size on different displays. DPI scale can be automatic or fixed. Available options are:
    Auto (Windows DPI)
    50%
    75%
    100%
    125%
    150%
    175%
    200%
TRIX Trendline #1 TRIX Trendline #2 TRIX Trendline #3 TRIX Trendline #4

Risk warning

Foreign exchange transactions carry a high degree of risk and any transaction involving currencies is exposed to, among other things, changes in a country's political condition, economic climate, acts of nature - all of which may substantially affect the price or availability of a given currency.

Speculative trading in the foreign exchange market is a challenging prospect with above average risk. You must therefore carefully consider your investment objectives, level of experience and appetite for such risk prior to entering this market. Most importantly, do not invest money that you are not in a position to lose.

In addition, trading on a margin basis means that any market movement will have a proportionate effect on your deposited funds. This can work for you as well as against you. The possibility exists that you could sustain a total loss of initial margin funds.

Risk Warning