Keltner Extreme Close Fade Script

← All 84 scripts

  • Research Build
  • 5-minute candles (30-minute expiry)
  • On price
  • Intermediate

iqow-keltner-extreme-close-fade.lua 4 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.

  • Reversal
  • On price
  • Intermediate

Fades extreme 5-minute candle closes that pierce both a Keltner Channel(20, 2.0) and the prior 20-bar Donchian high or low while stretched at least 1.5 ATR(14) away from SMA(20).

  • File iqow-keltner-extreme-close-fade.lua
  • Version 1.0.0
  • Size 129 lines · 4 KB
  • Timeframes 5-minute candles (30-minute expiry)
  • License MIT
Keltner Extreme Close Fade 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

The completed candle closes at or below the lower Keltner band, strictly below the previous 20-bar Donchian low, and at least 1.5 ATR(14) below SMA(20), with no trigger on the bar before.

LOWER marker

The completed candle closes at or above the upper Keltner band, strictly above the previous 20-bar Donchian high, and at least 1.5 ATR(14) above SMA(20), with no trigger on the bar before.

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

The cyan midline is the HLC3 EMA(20) and the purple lines mark the Keltner Channel(20, 2.0) boundaries. A green HIGHER triangle fires only when a sell-off breaks both the lower Keltner band and the 20-bar Donchian low while staying stretched below SMA(20). A red LOWER triangle marks the mirror upside exhaustion.

Indicators used

  • Keltner Channel (EMA of HLC3, RMA/ATR 20, mult 2.0)
  • Donchian Channel (20-bar lookback)
  • SMA (20) and ATR (14) stretch filter

Same view with built-in indicators: Add Keltner Channel (period 20, multiplier 2.0), Donchian Channel (20), SMA (20), and ATR (14), then wait for closes outside both channels.

Default settings

Channel period20
Keltner ATR multiplier2
Min SMA stretch in ATR(14)1.5

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

Key points

  1. Why waiting for both a Keltner break and a 20-bar Donchian break filters out shallow band touches.
  2. Measuring the close distance from SMA(20) in ATR(14) units adapts the stretch rule across quiet and volatile coins.
  3. Across 26 unseen windows from 2020 to 2026 on Binance 5m IQOW10 pairs, 25 of 26 windows beat the 54.05% break-even.
  4. This 5m/30m crypto setup is separate from the 1m/2m IQOW Ten leaderboard and still failed on TRXUSDT at 51.66%.

What the research found

The evidence behind this script

Tested on Binance 5m IQOW10 crypto spot data (2020-2026, 26 unseen walk-forward windows plus 2019-2026 holdout) at a 30-minute expiry. Break-even at 85% payout is 54.05%.

5m/30m · 26 windows
56.45%

Fixed params across 26 unseen windows (2020-2026): n=278,889 trades, Wilson low95 56.26%, 25 of 26 windows above 54.05%.

Unseen 2019-2026 all
56.68%

n=303,445 trades (low95 56.51%); every calendar year 2019-2026 beat 54.05% (2025 low 54.20%, Aug-Oct 2026 56.03%).

Walk-forward 26W
56.91%

Rolling out-of-sample selection: n=169,172 trades, low95 56.67%, 25 of 26 windows above break-even.

Overlap vs 5m Top 2
58.06%

Non-overlapping trades vs #1 Big Body Fade and #2 Z-Score Fade (max Jaccard 0.134); 9 of 10 coins cleared 54.05% (TRXUSDT 51.66%).

Evaluated on Binance 5m crypto spot candles (30m expiry), distinct from the 1m/2m IQOW Ten leaderboard (#1 Big Body Fade, #2 Z-Score Fade). Forex 1m discovery tests failed; restrict usage to 5m crypto and verify payouts above 80%.

Limitations. Evaluated on Binance 5m spot crypto data (IQOW10 basket, 30m expiry), not IQ Option's live quote feed, and separate from the 1m/2m IQOW Ten leaderboard (#1 Big Body Fade, #2 Z-Score Fade). On IQOW10 multi-year testing, 9 of 10 coins cleared 54.05% break-even while TRXUSDT scored 51.66%. EV at 80% payout is +0.0158. Internal research only; does not guarantee outcomes. 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: 87488981b75aaf014f9cbfe2792be47f1b5779a2c6ee85be9860c358bd3f7da8

-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Keltner Extreme Close Fade v1.0.0
--
-- Marks bars whose close pierces Keltner outer band, prior Donchian
-- channel extreme, and SMA stretch simultaneously.
--
-- HIGHER: Close <= Keltner(20,2.0) lower, close < prior 20-bar low, and (close-SMA)/ATR14 <= -1.5.
-- LOWER:  Close >= Keltner(20,2.0) upper, close > prior 20-bar high, and (close-SMA)/ATR14 >= +1.5.
--
-- 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 Keltner Extreme Close Fade",
    short_name = "IQOW KCEXT",
    overlay = true
}

input_group {
    "1. Channel extreme settings",
    period = input (20, "Channel period", input.integer, 5, 100),
    kc_mult = input (2.0, "Keltner ATR multiplier", input.double, 0.5, 5, 0.1, false),
    ext_atr = input (1.5, "Min SMA stretch in ATR(14)", input.double, 0.5, 5, 0.1, false)
}

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

input_group {
    "Colors",
    guide_color = input { default = "#56CEFF", type = input.color },
    band_color = input { default = "#9B59B6", type = input.color },
    line_width = input { default = 1, type = input.line_width },
    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 }
}

mid_guide = ema (hlc3, period)
atr_n = rma (tr, period)
upper_guide = mid_guide + kc_mult * atr_n
lower_guide = mid_guide - kc_mult * atr_n
dc_u = highest (high, period) [1]
dc_l = lowest (low, period) [1]
sma_m = sma (close, period)
atr14 = rma (tr, 14)

local c_now = get_value (close, nil)
local ku = get_value (upper_guide, nil)
local kl = get_value (lower_guide, nil)
local du = get_value (dc_u, nil)
local dl = get_value (dc_l, nil)
local sm = get_value (sma_m, nil)
local an = get_value (atr_n, nil)
local a14 = get_value (atr14, nil)

local data_is_ready =
    c_now ~= nil and ku ~= nil and kl ~= nil and du ~= nil and dl ~= nil and
    sm ~= nil and an ~= nil and an > 0 and a14 ~= nil and a14 > 0

local stretch = data_is_ready and ((c_now - sm) / a14) or 0
local raw_higher = data_is_ready and c_now <= kl and c_now < dl and stretch <= -ext_atr
local raw_lower = data_is_ready and c_now >= ku and c_now > du and stretch >= ext_atr

higher_setup = conditional (raw_higher and not raw_lower)
lower_setup = conditional (raw_lower and not raw_higher)

-- 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 lines_visible then
    plot (upper_guide, "Upper guide", band_color, line_width)
    plot (lower_guide, "Lower guide", band_color, line_width)
    plot (mid_guide, "Baseline", guide_color, line_width)
end

if signals_visible then
    plot_shape (
        confirmed_higher,
        "KCEXT HIGHER",
        shape_style.triangleup,
        shape_size.small,
        higher_color,
        shape_location.belowbar,
        -1,
        "HIGHER",
        signal_text_color
    )

    plot_shape (
        confirmed_lower,
        "KCEXT 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 reversal scripts

  • Reversal
  • On price
  • Intermediate
Research58.22%5m/5m · 26 windows

R3 Parabolic Run Shock

Fades 4-to-5-bar consecutive candle runs ending outside Keltner & EMA(50) stretch under ATR(5)/ATR(50) shock. Designed for closed-candle chart observation.

Indicators: Keltner Channel (20) · EMA (50) · ATR (5, 50) Shock · RSI (2)

  • Reversal
  • On price
  • Intermediate
Research56.82%5m/15m · 26 windows

R3 Triple Extreme Fade

Signals only when close simultaneously breaches Keltner outer band, prior Donchian(20), Z-Score(20), and RSI(2). Designed for closed-candle chart observation.

Indicators: Keltner Channel (20) · Donchian (20) · Z-Score (20) · RSI (2)

  • Reversal
  • Own panel
  • Beginner
IQOW Score64Rank #1726 walk-forward windows · 5,299,220 trades tested

RSI Law

Marks the candle on which a short RSI(5) closes back across the 30 or 70 line after an excursion into the extreme zone. This is the RSI Law rule from the related article, shown as completed-candle markers.

Indicators: RSI (5, 30/70)

Download all 84 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.