IQ_WIKI_SCRIP_V1.0.1.lua 9 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
- Get the file. Press Get the script. Your browser saves a .lua file.
- 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.
- 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.
Full illustrated guide, with screenshots →
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
- Signal engine
- On price
- Intermediate
A selective confluence overlay with five readable filters: EMA trend alignment and slope, RSI momentum without chasing extremes, ADX/DMI strength, ATR activity and a candle-quality guard.
The rules
HIGHER marker
EMAs 9, 21 and 50 are stacked upward with rising slow lines, RSI is between 52 and 68, ADX is at least 20 with +DI leading, ATR is at least 85% of its baseline and a bullish close stays within 1.25 ATR of the fast EMA.
LOWER marker
The mirror image: EMAs stacked downward, RSI between 32 and 48, ADX at least 20 with -DI leading, active ATR and a bearish close within 1.25 ATR of the fast EMA.
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
Three moving averages and a colour-coded ribbon show trend direction. LONG and SHORT markers appear on the candle where all five filters first agree.
Indicators used
- EMA 9/21/50
- RSI (14)
- ADX/DMI (14)
- ATR (14)
Same view with built-in indicators: EMA 9, 21 and 50, RSI (14), ADX (14) and ATR (14) with IQ Option's built-in indicators.
Default settings
| EMAs | 9 / 21 / 50 |
|---|---|
| RSI | 14 (52 / 68) |
| ADX/DMI | 14, threshold 20 |
| ATR activity | 85% of 20-EMA baseline |
| Max extension | 1.25 ATR |
Every value is an input in the script settings. Platform advice is off by default.
Key points
- Version 1.0.1 checks five things at once: trend, momentum, strength, activity and candle quality.
- The EMA ribbon turns green or red so you can see the trend at a glance.
- RSI must confirm the direction without being stretched to an extreme.
- ADX and the DMI lines make sure the move has strength behind it.
- A marker appears only when all five filters agree on a completed candle.
Limitations. More filters remove weak-looking conditions but also create late markers and miss moves; all filters can agree right before a losing outcome. Test on the Practice balance before risking real funds.
Complete source code
The download and this preview resolve to the same reviewed file. SHA-256: e2bdb8391ebe6ab801e38f04d5129209e3586d5a4aa70d73ecbcfbb6c66011ce
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQ_WIKI_SCRIP_V1.0.1
--
-- A chart-timeframe confluence indicator built from five readable filters:
-- 1. EMA trend alignment and slope
-- 2. RSI momentum confirmation without chasing extremes
-- 3. ADX/DMI directional strength
-- 4. ATR activity compared with its recent baseline
-- 5. Candle direction plus an ATR extension guard
--
-- LONG and SHORT markers use the previous completed candle. They appear after
-- the next candle begins and are shifted back one bar onto the candle that
-- qualified. This avoids making a marker depend on an unfinished candle.
--
-- This indicator does not place trades, choose an expiry, predict outcomes, or
-- guarantee results. Review the settings and test on a Practice balance first.
instrument {
name = "IQ_WIKI_SCRIP_V1.0.1",
short_name = "IQ WIKI PRO",
icon = "indicators:ADX",
overlay = true
}
input_group {
"1. Trend engine",
fast_period = input (9, "Fast EMA period", input.integer, 2, 100),
slow_period = input (21, "Slow EMA period", input.integer, 3, 250),
anchor_period = input (50, "Trend anchor EMA period", input.integer, 5, 500)
}
input_group {
"2. Momentum filter",
rsi_period = input (14, "RSI period", input.integer, 2, 100),
momentum_level = input (52, "RSI confirmation level", input.double, 51, 64, 1, false),
momentum_cap = input (68, "RSI extreme guard", input.double, 65, 85, 1, false)
}
input_group {
"3. Strength filter",
strength_period = input (14, "ADX and DMI period", input.integer, 2, 100),
strength_threshold = input (20, "Minimum ADX strength", input.double, 1, 60, 1, false)
}
input_group {
"4. Volatility filter",
atr_period = input (14, "ATR period", input.integer, 2, 100),
volatility_baseline_period = input (20, "ATR baseline EMA period", input.integer, 2, 200),
minimum_volatility_percent = input (85, "Minimum volatility vs baseline (%)", input.double, 10, 300, 5, false)
}
input_group {
"5. Price quality filter",
maximum_extension_atr = input (1.25, "Maximum close-to-fast-EMA distance (ATR)", input.double, 0.10, 5.00, 0.05, false)
}
input_group {
"Display",
trend_lines_visible = input { default = true, type = input.plot_visibility },
anchor_visible = input { default = true, type = input.plot_visibility },
ribbon_visible = input { default = true, type = input.plot_visibility },
volatility_guide_visible = input { default = false, type = input.plot_visibility },
signals_visible = input { default = true, type = input.plot_visibility }
}
input_group {
"Trend colors",
fast_color = input { default = "#56CEFF", type = input.color },
slow_color = input { default = "#FFB15A", type = input.color },
anchor_color = input { default = rgba(255, 255, 255, 0.48), type = input.color },
trend_line_width = input { default = 2, type = input.line_width },
anchor_line_width = input { default = 1, type = input.line_width }
}
input_group {
"Ribbon colors",
bullish_ribbon_color = input { default = rgba(37, 225, 84, 0.14), type = input.color },
bearish_ribbon_color = input { default = rgba(255, 108, 88, 0.14), type = input.color },
neutral_ribbon_color = input { default = rgba(255, 255, 255, 0.05), type = input.color }
}
input_group {
"Signal colors",
long_signal_color = input { default = "#25E154", type = input.color },
short_signal_color = input { default = "#FF6C58", type = input.color },
signal_text_color = input { default = "#FFFFFF", type = input.color }
}
input_group {
"Optional volatility guide",
volatility_guide_atr = input (1.50, "Guide distance (ATR)", input.double, 0.10, 10.00, 0.10, false),
volatility_guide_color = input { default = rgba(181, 140, 255, 0.28), type = input.color },
volatility_guide_width = input { default = 1, type = input.line_width }
}
-- Trend engine
fast_ema = ema (close, fast_period)
slow_ema = ema (close, slow_period)
anchor_ema = ema (close, anchor_period)
-- RSI momentum filter using the documented built-in.
rsi_value = rsi (close, rsi_period)
-- ADX/DMI strength filter.
up_move = change (high)
down_move = -change (low)
positive_dm = iff (up_move > down_move and nz (up_move) > 0, up_move, 0)
negative_dm = iff (down_move > up_move and nz (down_move) > 0, down_move, 0)
directional_atr = rma (tr, strength_period)
directional_atr_safe = max (directional_atr, 0.0000000001)
positive_di = 100 * rma (positive_dm / directional_atr_safe, strength_period)
negative_di = 100 * rma (negative_dm / directional_atr_safe, strength_period)
dmi_sum_safe = max (positive_di + negative_di, 0.0000000001)
adx_value = 100 * rma (abs (positive_di - negative_di) / dmi_sum_safe, strength_period)
-- ATR activity filter and optional visual guide.
atr_value = rma (tr, atr_period)
atr_baseline = ema (atr_value, volatility_baseline_period)
volatility_guide_upper = slow_ema + atr_value * volatility_guide_atr
volatility_guide_lower = slow_ema - atr_value * volatility_guide_atr
-- Read current scalar values explicitly before using them in Lua conditions.
local close_now = get_value (close, 0)
local open_now = get_value (open, 0)
local fast_now = get_value (fast_ema, 0)
local slow_now = get_value (slow_ema, 0)
local slow_previous = get_value (slow_ema [1], 0)
local anchor_now = get_value (anchor_ema, 0)
local anchor_previous = get_value (anchor_ema [1], 0)
local rsi_now = get_value (rsi_value, 50)
local positive_di_now = get_value (positive_di, 0)
local negative_di_now = get_value (negative_di, 0)
local adx_now = get_value (adx_value, 0)
local atr_now = get_value (atr_value, 0)
local atr_baseline_now = get_value (atr_baseline, 0)
local warmup_anchor = get_value (anchor_ema [anchor_period], 0)
local warmup_strength = get_value (adx_value [strength_period], -1)
local warmup_volatility = get_value (atr_baseline [volatility_baseline_period], 0)
local periods_are_valid =
fast_period < slow_period and
slow_period < anchor_period and
momentum_level > 50 and
momentum_cap > momentum_level
local data_is_ready =
periods_are_valid and
close_now > 0 and
fast_now > 0 and
slow_now > 0 and
anchor_now > 0 and
atr_now > 0 and
atr_baseline_now > 0 and
warmup_anchor > 0 and
warmup_strength >= 0 and
warmup_volatility > 0
local bullish_trend =
fast_now > slow_now and
slow_now > anchor_now and
slow_now > slow_previous and
anchor_now > anchor_previous
local bearish_trend =
fast_now < slow_now and
slow_now < anchor_now and
slow_now < slow_previous and
anchor_now < anchor_previous
local bullish_momentum =
rsi_now >= momentum_level and
rsi_now <= momentum_cap
local bearish_momentum =
rsi_now <= (100 - momentum_level) and
rsi_now >= (100 - momentum_cap)
local bullish_strength =
adx_now >= strength_threshold and
positive_di_now > negative_di_now
local bearish_strength =
adx_now >= strength_threshold and
negative_di_now > positive_di_now
local volatility_is_active =
atr_now >= atr_baseline_now * minimum_volatility_percent / 100
local bullish_price_quality =
close_now > open_now and
close_now > fast_now and
(close_now - fast_now) <= atr_now * maximum_extension_atr
local bearish_price_quality =
close_now < open_now and
close_now < fast_now and
(fast_now - close_now) <= atr_now * maximum_extension_atr
-- conditional() stores each bar's boolean so completed-bar history is usable.
long_setup = conditional (
data_is_ready and
bullish_trend and
bullish_momentum and
bullish_strength and
volatility_is_active and
bullish_price_quality
)
short_setup = conditional (
data_is_ready and
bearish_trend and
bearish_momentum and
bearish_strength and
volatility_is_active and
bearish_price_quality
)
-- Confirm only a new setup on the previous completed candle. Indexed
-- series[boolean] values are converted to Lua booleans before native and/not.
-- Offset -1 places the marker on that candle after the current candle opens.
confirmed_long_setup = conditional (
get_value (long_setup [1], false) and
not get_value (long_setup [2], false)
)
confirmed_short_setup = conditional (
get_value (short_setup [1], false) and
not get_value (short_setup [2], false)
)
-- Clean trend context.
ribbon_color = iff (
fast_ema > slow_ema,
bullish_ribbon_color,
iff (fast_ema < slow_ema, bearish_ribbon_color, neutral_ribbon_color)
)
if ribbon_visible then
fill (fast_ema, slow_ema, "Trend ribbon", ribbon_color)
end
if trend_lines_visible then
plot (fast_ema, "Fast EMA", fast_color, trend_line_width)
plot (slow_ema, "Slow EMA", slow_color, trend_line_width)
end
if anchor_visible then
plot (anchor_ema, "Trend anchor EMA", anchor_color, anchor_line_width)
end
if volatility_guide_visible then
plot (volatility_guide_upper, "Upper ATR guide", volatility_guide_color, volatility_guide_width)
plot (volatility_guide_lower, "Lower ATR guide", volatility_guide_color, volatility_guide_width)
end
if signals_visible then
plot_shape (
confirmed_long_setup,
"Confirmed LONG setup",
shape_style.triangleup,
shape_size.small,
long_signal_color,
shape_location.belowbar,
-1,
"LONG",
signal_text_color
)
plot_shape (
confirmed_short_setup,
"Confirmed SHORT setup",
shape_style.triangledown,
shape_size.small,
short_signal_color,
shape_location.abovebar,
-1,
"SHORT",
signal_text_color
)
end
More trend scripts
- Trend
- On price
- Intermediate
Supertrend EMA 200
Marks Supertrend direction flips only when the candle closes on the same side of the 200-period EMA. The EMA acts as a simple long-term bias filter for the Supertrend flip.
Indicators: Supertrend (10, 3) · EMA (200)
- Trend
- Own panel
- Intermediate
Trend Intensity Index
Marks the moment the Trend Intensity Index enters its strong zone: above 80 for upward pressure or below 20 for downward pressure, with the close on the matching side of the 60-period SMA. It is a trend-strength entry marker, not a reversal marker.
Indicators: Trend Intensity Index (30, SMA 60)
- Trend
- On price
- Intermediate
VHF EMA Cross
Marks EMA 9 and EMA 21 crosses only while the Vertical Horizontal Filter reports a trending market. The filter removes crosses that happen during sideways price action, where moving-average crosses tend to be unreliable.
Indicators: Vertical Horizontal Filter (28, 0.35) · EMA (9) · EMA (21)
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.