iqow-bigbody-fade.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
- 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.
- Price action
- On price
- Intermediate
Marks the candle after an unusually big one: a body of at least 2 ATR, while ADX is at or above its recent median. It expects a short snap back against that move.
The rules
HIGHER marker
The candle is red with a body (open minus close) of at least 2 ATR(14), and ADX(14) is at or above the 50th percentile of its last 100 values.
LOWER marker
The candle is green with a body (close minus open) of at least 2 ATR(14), and ADX(14) is at or above the 50th percentile of its last 100 values.
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
There are no lines: the markers are the whole display. A green HIGHER triangle under a candle follows a big red candle; a red LOWER triangle above a candle follows a big green candle.
Indicators used
- ATR (14)
- ADX (14) against its last 100 values
Same view with built-in indicators: Add ATR (14) and Average Directional Index (14) on the chart and look for a candle body of at least 2 ATR while ADX is high compared with its last 100 values.
Default settings
| ATR period | 14 |
|---|---|
| Body at least this many ATR | 2 |
| ADX period | 14 |
| ADX percentile of the last 100 values | 50 |
Every value is an input in the script settings. Platform advice is off by default.
Key points
- ATR measures a typical candle range, so a body of 2 ATR is an unusually big candle.
- Here a big red candle is followed by a HIGHER marker and a big green candle by a LOWER marker.
- ADX has to be at or above its recent median, so the market is already moving.
- It is meant for 2-minute candles and a short expiry of about 3 minutes.
- The script has no clock, so you choose the hours you use it in.
- Test on a Practice balance first.
Limitations. Crypto pairs only: in the internal research it showed no edge on forex pairs. The script has no clock, so any time-of-day window (the internal research used 00:00 to 03:00 UTC) must be chosen by the trader. The setup fails when a big candle starts a run in the same direction, for example on news. Internal iqoptionwiki backtest only. 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: ad00b69d7380e056a78ec0b0ea2a83ef3c9ddf7fe98c86b9316dcffc4c48d9f7
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Big Body Fade v1.0.0
--
-- A candle whose body (close minus open) is at least 2 ATR long is an unusually
-- big, fast move. This script marks the candle after it in the opposite direction,
-- but only while ADX is at or above its own median of the last 100 candles, so the
-- market is already moving. It is built for 2-minute candles with a 3 minute expiry.
--
-- HIGHER: the candle is red with a body of at least 2 ATR(14), and ADX(14) is at
-- or above the 50th percentile of its last 100 values.
-- LOWER: the candle is green with a body of at least 2 ATR(14), and ADX(14) is at
-- or above the 50th percentile of its last 100 values.
--
-- The script has no clock. Run it only in the time window you choose (the
-- internal research used 00:00 to 03:00 UTC); outside that window it still marks.
--
-- 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 Big Body Fade",
short_name = "IQOW BIGBODY",
overlay = true
}
input_group {
"1. Candle body",
atr_period = input (14, "ATR period", input.integer, 2, 100),
body_multiplier = input (2, "Body at least this many ATR", input.double, 0.5, 6, 0.1, false)
}
input_group {
"2. ADX filter",
adx_filter_enabled = input { default = true, name = "Use the ADX filter", type = input.boolean },
adx_period = input (14, "ADX period", input.integer, 2, 100),
adx_percentile = input (50, "ADX at or above this percentile of the last 100 values", input.integer, 1, 99)
}
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 }
}
-- ATR and the candle body measured in ATR.
atr_value = rma (tr, atr_period)
body_in_atr = (close - open) / max (atr_value, 1e-10)
-- ADX with Wilder smoothing: DI lines from the smoothed directional moves,
-- then the smoothed absolute DI difference.
up_move = change (high)
down_move = -change (low)
plus_dm = iff (up_move > down_move and nz (up_move) > 0, up_move, 0)
minus_dm = iff (down_move > up_move and nz (down_move) > 0, down_move, 0)
average_range = max (rma (tr, adx_period), 1e-10)
plus_di = 100 * rma (plus_dm, adx_period) / average_range
minus_di = 100 * rma (minus_dm, adx_period) / average_range
dx_value = 100 * abs (plus_di - minus_di) / max (plus_di + minus_di, 1e-10)
adx_value = rma (dx_value, adx_period)
adx_reference = percentile_nearest_rank (adx_value, 100, adx_percentile)
local body_now = get_value (body_in_atr, nil)
local adx_now = get_value (adx_value, nil)
local adx_reference_now = get_value (adx_reference, nil)
local atr_now = get_value (atr_value, nil)
local adx_is_ready = (not adx_filter_enabled) or (adx_now ~= nil and adx_reference_now ~= nil)
local data_is_ready = body_now ~= nil and atr_now ~= nil and atr_now > 0 and adx_is_ready
local adx_allows = (not adx_filter_enabled) or (adx_is_ready and adx_now >= adx_reference_now)
-- Big red candle fades up, big green candle fades down.
higher_setup = conditional (
data_is_ready and adx_allows and body_now <= -body_multiplier
)
lower_setup = conditional (
data_is_ready and adx_allows and body_now >= body_multiplier
)
-- 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)
)
if signals_visible then
plot_shape (
confirmed_higher,
"BIGBODY HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"BIGBODY 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 price action scripts
- Price action
- On price
- Intermediate
RSI EMA200 Engulfing
Marks an engulfing candle that agrees with the long-term EMA 200 side and the RSI 50 midline. The EMA and RSI filter out engulfing candles that go against the broader direction.
Indicators: EMA (200) · RSI (14, midline 50) · Engulfing candle
- Price action
- On price
- Beginner
Three Candles Continuation
Marks the candle that completes three same-colour full-bodied candles with steady closes while price is on the matching side of EMA 20. An option flips the reading to the counter-trend idea described in the article.
Indicators: Three full candles · EMA (20)
- Price action
- On price
- Beginner
Inside Bar Breakout
Marks the first close beyond the mother bar after an inside bar, within 3 candles and in the direction of EMA 50. The inside bar shows a pause; the breakout shows which way it resolved.
Indicators: Inside bar pattern · EMA (50)
Download all 74 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.