Trend Intensity Index Markers

← All 70 scripts

iqow-trend-intensity-index-markers.lua 5 KB · Free, MIT license

For the IQ Option web traderoom. Quadcode does not draw HIGHER and LOWER markers on mobile.

Add it to IQ Option in 3 steps

  1. Get the file. Press Get the script. Your browser saves a .lua file.
  2. Import it in IQ Option. Open the web traderoom on the Practice balance. Click the wave icon at the bottom left of the chart, open the Scripts tab, press Import script and pick the file.
  3. Add it to the chart. The code opens in an editor. Click the plus button under it (Add to chart). Save is only needed after you edit the code.

Risk. Trading can lose money. A marker is a chart observation, not a prediction, and this script is checked on test data, not proven in live trading. Try it on the Practice balance first.

  • Trend
  • Marker companion
  • On price
  • Intermediate

Draws the HIGHER and LOWER markers of the Trend Intensity Index script on the price chart, above and below the candles, so they show on every asset, JPY pairs included. No lines: add Trend Intensity Index as well for the TII line.

  • File iqow-trend-intensity-index-markers.lua
  • Version 1.0.0
  • Size 139 lines · 5 KB
  • Timeframes 1-minute to 15-minute candles
  • License MIT

This is the price-chart companion of Trend Intensity Index. It draws no lines, only the same HIGHER and LOWER markers, above and below the candles, so they show on every asset, JPY pairs included. Load both scripts and keep their settings equal.

Trend Intensity Index Markers drawn on synthetic candles
How the script draws, shown on synthetic candles generated for testing. It is an illustration of the markers and lines, not real market data or a result.

The rules

HIGHER marker

TII(30) crosses above 80 on a candle that closes above its 60-period SMA.

LOWER marker

TII(30) crosses below 20 on a candle that closes below its 60-period SMA.

A marker appears after the next candle opens and is drawn on the candle that completed the setup. It is a chart observation, not an instruction to trade.

How to read it

Markers only, on the price chart: a green HIGHER triangle below a candle and a red LOWER triangle above it, each on the candle that completed the setup of Trend Intensity Index. A marker appears after the next candle opens and does not move. The script draws no line, so add Trend Intensity Index (it opens in its own panel) to see the TII line. Both scripts use the same settings.

Indicators used

  • Trend Intensity Index (30, SMA 60)

Same view with built-in indicators: Add Trend Intensity Index (major 60, minor 30) with levels 20 and 80 and an SMA (60) on the price chart.

Default settings

SMA period (major)60
TII period (minor)30
Low level20
High level80

Every value is an input in the script settings. Platform advice is off by default.

Key points

  1. This is the price-chart companion of Trend Intensity Index: the same rule, the same settings and the same HIGHER and LOWER markers.
  2. A script in its own panel draws its markers at the candle's price on the panel's axis, so on JPY pairs and other assets priced above about 100 they fall outside the panel.
  3. The companion draws them above and below the candles instead, so they show on every asset.
  4. Each marker sits on the candle that completed the setup and appears after the next candle opens; it does not move or disappear.
  5. It draws no lines: add Trend Intensity Index to see the TII line in its own panel.
  6. Test both on a Practice balance first.

Limitations. Same setup and same limits as Trend Intensity Index: the markers describe the rule, not what the next candle will do. It draws no lines, so load the panel script to see why a marker appeared. Import both on the Practice balance and keep their settings equal. Test on the Practice balance before risking real funds.

Learn the strategy: read the full guide on IQOptionWiki →

Complete source code

The download and this preview resolve to the same reviewed file. SHA-256: a717e78077a3e51971bcf8950dcfb956857463b2d93e81a48064fbf4b90724a9

-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Trend Intensity Index Markers v1.0.0
--
-- Price-chart companion of IQOW Trend Intensity Index (trend-intensity-index).
-- It draws no lines: only that script's HIGHER and LOWER markers, above and
-- below the candles on the price chart. A script with its own panel draws its
-- markers at the candle's price on the panel's axis, so on assets priced above
-- about 100 (for example JPY pairs) they fall outside the panel. Add IQOW
-- Trend Intensity Index as well to see the TII line. Keep the settings of both
-- scripts equal.
--
-- The Trend Intensity Index (TII) compares how much of the recent price
-- distance from a 60-period SMA is above versus below it. It reads 0 to 100:
-- high values mean strong upward pressure, low values strong downward pressure.
-- Formula follows the official IQ Option indicator.
--
-- HIGHER: TII(30) crosses above 80 while the close is above its SMA 60.
-- LOWER:  TII(30) crosses below 20 while the close is below its SMA 60.
--
-- Markers use the previous completed candle: they appear after the next candle
-- opens and are shifted back one bar onto the candle that qualified.
-- Educational chart tool only. It does not place trades, choose an expiry,
-- predict outcomes, or guarantee results. Test on a Practice balance first.

instrument {
    name = "IQOW Trend Intensity Index Markers",
    short_name = "MK TII",
    overlay = true
}

input_group {
    "1. Trend Intensity Index",
    major_period = input (60, "SMA period (major)", input.integer, 3, 300),
    minor_period = input (30, "TII period (minor)", input.integer, 2, 200)
}

input_group {
    "2. Levels",
    low_level = input (20, "Low level", input.double, 5, 45, 1, false),
    high_level = input (80, "High level", input.double, 55, 95, 1, false)
}

input_group {
    "Display and advice",
    signals_visible = input { default = true, type = input.plot_visibility },
    advice_enabled = input { default = false, name = "Enable platform advice", type = input.boolean }
}

input_group {
    "Colors",
    higher_color = input { default = "#25E154", type = input.color },
    lower_color = input { default = "#FF6C58", type = input.color },
    signal_text_color = input { default = "#FFFFFF", type = input.color }
}

-- Distance of the close from its SMA, split into the part above and below.
major_sma = sma (close, major_period)
distance = close - major_sma
positive_sum = sum (max (distance, 0), minor_period)
negative_sum = -sum (min (distance, 0), minor_period)
tii_value = 100 * positive_sum / max (positive_sum + negative_sum, 1e-10)

-- Current-bar scalars for the Lua rule logic.
local tii_now = get_value (tii_value, nil)
local tii_before = get_value (tii_value [1], nil)
local close_now = get_value (close, nil)
local sma_now = get_value (major_sma, nil)

local settings_are_valid = minor_period <= major_period and low_level < high_level

local data_is_ready =
    settings_are_valid and
    tii_now ~= nil and
    tii_before ~= nil and
    close_now ~= nil and
    sma_now ~= nil and
    get_value (tii_value [major_period + minor_period], nil) ~= nil

-- Event: TII crosses a level on this candle while the close sits on the same side of the SMA.
higher_setup = conditional (
    data_is_ready and tii_before <= high_level and tii_now > high_level and close_now > sma_now
)
lower_setup = conditional (
    data_is_ready and tii_before >= low_level and tii_now < low_level and close_now < sma_now
)

-- Confirm only a new setup on the previous completed candle.
confirmed_higher = conditional (
    get_value (higher_setup [1], false) and
    not get_value (higher_setup [2], false)
)

confirmed_lower = conditional (
    get_value (lower_setup [1], false) and
    not get_value (lower_setup [2], false)
)

-- Markers on the price chart: HIGHER below the candle, LOWER above it. Offset -1
-- puts each one on the candle that completed the setup (the confirmation above
-- is evaluated when the next candle opens).
if signals_visible then
    plot_shape (
        confirmed_higher,
        "TII HIGHER",
        shape_style.triangleup,
        shape_size.small,
        higher_color,
        shape_location.belowbar,
        -1,
        "HIGHER",
        signal_text_color
    )

    plot_shape (
        confirmed_lower,
        "TII LOWER",
        shape_style.triangledown,
        shape_size.small,
        lower_color,
        shape_location.abovebar,
        -1,
        "LOWER",
        signal_text_color
    )
end

-- QCS advice is a platform notification state only; it does not place trades.
if advice_enabled and
    get_value (confirmed_higher, false) and
    not get_value (confirmed_lower, false) then
    advise (advice.buy)
elseif advice_enabled and
    get_value (confirmed_lower, false) and
    not get_value (confirmed_higher, false) then
    advise (advice.sell)
else
    advise (advice.neutral)
end

More trend scripts

  • Trend
  • On price
  • Beginner

EMA50 CCI 100

Marks the first CCI break beyond +100 or -100 shortly after price crossed the EMA 50 and stayed on that side. The EMA sets the direction and CCI times the entry, at most once per EMA cross.

Indicators: EMA (50) · CCI (14, levels +/-100)

  • Trend
  • On price
  • Advanced

Fractal Alligator

Marks a close through the last confirmed fractal level when that level lies beyond the Alligator teeth. The Alligator gives the trend reference and the fractal gives the breakout level.

Indicators: Williams Fractals (5) · Alligator (13/8/5, shifted 8/5/3)

  • Trend
  • On price
  • Beginner

Heikin Ashi EMA

Marks the first bullish or bearish Heikin-Ashi candle after a run of two opposite candles, only when price closes on the matching side of EMA 50. Heikin-Ashi is calculated inside the script, so the chart can stay on regular candles.

Indicators: Heikin-Ashi candles (calculated) · EMA (50)

Download all 70 scripts as one ZIP · MIT License, provided “as is”, without warranty. IQOptionWiki is independent of the IQ Option platform operator. Nothing here is investment advice or a guarantee of results.

GENERAL RISK WARNING

The financial products offered by the company carry a high level of risk and can result in the loss of all your funds. You should never invest money that you cannot afford to lose.
Kindly note that this article does not provide any investment advice. The information presented regarding past events or potential future developments is solely an opinion and cannot be guaranteed as factual, including the provided examples. We caution readers accordingly.