Vortex MACD Markers

← All 70 scripts

iqow-vortex-macd-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 Vortex MACD script on the price chart, above and below the candles, so they show on every asset, JPY pairs included. No lines: add Vortex MACD as well for the Vortex lines.

  • File iqow-vortex-macd-markers.lua
  • Version 1.0.0
  • Size 145 lines · 5 KB
  • Timeframes 5-minute candles (article)
  • License MIT

This is the price-chart companion of Vortex MACD. 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.

Vortex MACD 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

Vortex VI+(21) crosses above VI- on this candle while the MACD(12, 26, 9) line is above its signal line.

LOWER marker

Vortex VI+(21) crosses below VI- on this candle while the MACD(12, 26, 9) line is below its signal line.

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 Vortex MACD. A marker appears after the next candle opens and does not move. The script draws no line, so add Vortex MACD (it opens in its own panel) to see the Vortex lines. Both scripts use the same settings.

Indicators used

  • Vortex Indicator (21)
  • MACD (12, 26, 9)

Same view with built-in indicators: Add IQ Option's Vortex Indicator (21) and MACD (12, 26, 9).

Default settings

Vortex period21
MACD fast12
MACD slow26
MACD signal9

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 Vortex MACD: 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 Vortex MACD to see the Vortex lines in its own panel.
  6. Test both on a Practice balance first.

Limitations. Same setup and same limits as Vortex MACD: 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: f7935ff0129fc389874799e7c41023acd712236018366455c30e48ae6cedf2da

-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Vortex MACD Markers v1.0.0
--
-- Price-chart companion of IQOW Vortex MACD (vortex-macd). 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 Vortex MACD as well
-- to see the Vortex lines. Keep the settings of both scripts equal.
--
-- Combines the Vortex Indicator (21) with MACD (12, 26, 9), as in the related
-- article. A VI+ / VI- cross shows the dominant price movement changing side; the
-- MACD line against its signal line checks that momentum agrees. The article
-- suggests period 21 or 34 on a 5-minute chart; 21 is the default here. The
-- MACD condition is part of the rule only.
--
-- HIGHER: VI+ crosses above VI- while the MACD line is above its signal line.
-- LOWER:  VI+ crosses below VI- while the MACD line is below its signal line.
--
-- 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 Vortex MACD Markers",
    short_name = "MK VORTEX",
    overlay = true
}

input_group {
    "1. Vortex Indicator",
    vortex_period = input (21, "Vortex period", input.integer, 2, 100)
}

input_group {
    "2. MACD",
    macd_fast_period = input (12, "Fast EMA period", input.integer, 2, 100),
    macd_slow_period = input (26, "Slow EMA period", input.integer, 3, 200),
    macd_signal_period = input (9, "Signal period", input.integer, 2, 100)
}

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 }
}

-- Vortex Indicator as in the official indicator.
plus_movement = abs (high - low [1])
minus_movement = abs (low - high [1])
true_range_sum = sum (tr, vortex_period)
vi_plus = sum (plus_movement, vortex_period) / iff (true_range_sum > 1e-10, true_range_sum, 1e-10)
vi_minus = sum (minus_movement, vortex_period) / iff (true_range_sum > 1e-10, true_range_sum, 1e-10)

macd_line = ema (close, macd_fast_period) - ema (close, macd_slow_period)
signal_line = ema (macd_line, macd_signal_period)

local plus_now = get_value (vi_plus, nil)
local minus_now = get_value (vi_minus, nil)
local plus_previous = get_value (vi_plus [1], nil)
local minus_previous = get_value (vi_minus [1], nil)
local macd_now = get_value (macd_line, nil)
local signal_now = get_value (signal_line, nil)

local periods_are_valid = macd_fast_period < macd_slow_period

local data_is_ready =
    periods_are_valid and
    get_value (close [macd_slow_period + macd_signal_period], nil) ~= nil and
    get_value (close [vortex_period + 1], nil) ~= nil and
    plus_now ~= nil and
    minus_now ~= nil and
    plus_previous ~= nil and
    minus_previous ~= nil and
    macd_now ~= nil and
    signal_now ~= nil

-- Event: VI+ crosses VI- on this candle.
local vortex_crosses_up = data_is_ready and plus_previous <= minus_previous and plus_now > minus_now
local vortex_crosses_down = data_is_ready and plus_previous >= minus_previous and plus_now < minus_now

higher_setup = conditional (vortex_crosses_up and macd_now > signal_now)
lower_setup = conditional (vortex_crosses_down and macd_now < signal_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,
        "VORTEX MACD HIGHER",
        shape_style.triangleup,
        shape_size.small,
        higher_color,
        shape_location.belowbar,
        -1,
        "HIGHER",
        signal_text_color
    )

    plot_shape (
        confirmed_lower,
        "VORTEX MACD 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
  • Own panel
  • Intermediate

Vortex MACD

Marks a Vortex VI+/VI- cross when the MACD line is on the matching side of its signal line. The Vortex cross shows which direction dominates and the MACD checks that momentum agrees.

Indicators: Vortex Indicator (21) · MACD (12, 26, 9)

  • Trend
  • On price
  • Beginner

Well Defined EMA

After the EMA 20 crosses the EMA 50, marks the first pullback of price to the EMA 20 that closes back in the direction of the new trend. It turns the article's two steps (cross, then pullback) into one marker.

Indicators: EMA (20) · EMA (50)

  • Trend
  • On price
  • Beginner

Williams R EMA Pullback

Marks the Williams %R cross back out of its oversold or overbought zone, but only when price is on the matching side of the EMA 50. The EMA turns the article's plain %R cross into a pullback-in-trend setup.

Indicators: Williams %R (14, -80/-20) · 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.