- Breakout
- On price
- Intermediate
Marks a close through the Fractal Chaos Bands: the upper band is the last confirmed fractal high and the lower band the last confirmed fractal low.
The rules
HIGHER marker
The candle closes above the upper Fractal Chaos Band after the previous close was at or below it.
LOWER marker
The candle closes below the lower Fractal Chaos Band after the previous close was at or above it.
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 green line is the last confirmed fractal high and the red line the last fractal low, with a light fill between them. Flat bands suggest a range, and sloping steps suggest a trend. A green HIGHER triangle marks a close above the green line; a red LOWER triangle marks a close below the red line.
Indicators used
- Fractal Chaos Bands
Same view with built-in indicators: Add the Fractal Chaos Bands indicator and watch for closes through either band.
Default settings
| Fractal size | 5 candles |
|---|
Every value is an input in the script settings. Platform advice is off by default.
Key points
- A fractal is five candles with the highest high or lowest low in the middle.
- The upper band is the level of the last confirmed fractal high, and the lower band the last fractal low.
- Flat bands suggest a range; stepping bands suggest a trend.
- A close through a band is marked HIGHER above the upper band and LOWER below the lower band.
- Fractals are confirmed two candles later, so nothing is repainted.
- Test the idea on the Practice balance and consider adding a filter such as a moving average.
Limitations. Fractals confirm two candles late, so the bands lag, and a close through a band in a range is often a false break. The article suggests extra filters such as a moving average; this script uses the bands alone. Test on the Practice balance before risking real funds.
Install it in four steps
- Download and inspectDownload one .lua file and open it in a plain-text editor if you want to read it first. If you downloaded the ZIP, extract it.
- Open Chart Analysis → ScriptsIn the IQ Option traderoom, choose the Practice balance, open the chart analysis panel, select Scripts and choose Import script.
- Save and add to chartSelect the downloaded file, review the imported code, choose Save, then use the + control to add it to the chart.
- Change one input at a timeConfirm the default view first. Then adjust periods, levels or colours one setting at a time and note what changes.
Complete source code
The download and this preview resolve to the same reviewed file. SHA-256: bbec39d98629e5bc08bf35842c93205df66f4d758bd426de68152d5730f44fc8
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Fractal Chaos Bands Break v1.0.0
--
-- Fractal Chaos Bands draw the level of the last confirmed Williams fractal
-- high (upper band) and fractal low (lower band). A fractal is five candles
-- with the extreme in the middle and is confirmed two candles later. The
-- bands are flat in ranges and step in the trend direction.
--
-- HIGHER: the candle closes above the upper band after the previous close was
-- at or below it.
-- LOWER: the candle closes below the lower band after the previous close was
-- at or above it.
--
-- 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 Fractal Chaos Bands Break",
short_name = "IQOW FCB",
overlay = true
}
input_group {
"Display and advice",
bands_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",
upper_color = input { default = "#25E154", type = input.color },
lower_color_line = input { default = "#FF6C58", type = input.color },
band_fill_color = input { default = rgba(87, 161, 208, 0.12), 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 }
}
-- Williams fractal: the middle candle of five has the highest high (or lowest
-- low). It is only confirmed two candles later, so the pivot is read at [2]
-- and the level is remembered until the next fractal appears. No future bars.
local pivot_high = get_value (high [2], nil)
local pivot_low = get_value (low [2], nil)
local is_up_fractal =
pivot_high ~= nil and get_value (high [4], nil) ~= nil and
get_value (high, 0) <= pivot_high and get_value (high [1], 0) <= pivot_high and
get_value (high [3], 0) <= pivot_high and get_value (high [4], 0) <= pivot_high
local is_down_fractal =
pivot_low ~= nil and get_value (low [4], nil) ~= nil and
get_value (low, 0) >= pivot_low and get_value (low [1], 0) >= pivot_low and
get_value (low [3], 0) >= pivot_low and get_value (low [4], 0) >= pivot_low
up_fractal_level = iff (is_up_fractal, high [2], up_fractal_level [1])
down_fractal_level = iff (is_down_fractal, low [2], down_fractal_level [1])
local upper_now = get_value (up_fractal_level, nil)
local lower_now = get_value (down_fractal_level, nil)
local close_now = get_value (close, nil)
local close_previous = get_value (close [1], nil)
local data_is_ready =
upper_now ~= nil and lower_now ~= nil and
close_now ~= nil and close_previous ~= nil
-- Break: close crosses the band on this candle.
higher_setup = conditional (
data_is_ready and close_now > upper_now and close_previous <= upper_now
)
lower_setup = conditional (
data_is_ready and close_now < lower_now and close_previous >= lower_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)
)
if bands_visible then
fill (down_fractal_level, up_fractal_level, "Fractal Chaos area", band_fill_color)
plot (up_fractal_level, "Upper band", upper_color, line_width)
plot (down_fractal_level, "Lower band", lower_color_line, line_width)
end
if signals_visible then
plot_shape (
confirmed_higher,
"FCB HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"FCB 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 breakout scripts
- Breakout
- On price
- Beginner
BB1 Bollinger
Marks the first candle that closes outside a narrow Bollinger Band (deviation 1) after two candles closed inside it. It follows the BB1 rule from the related article, where the move out of the band is read in the direction of the break.
Indicators: Bollinger Bands (20, deviation 1)
- Breakout
- On price
- Intermediate
Donchian Turtle Breakout
Marks a close beyond the previous 20-candle high or low when ATR is above its 50-period average. It is a simplified channel breakout in the spirit of the Turtle rules, with an ATR filter to ask for expanding volatility.
Indicators: Donchian breakout (20) · ATR (14) · SMA of ATR (50)
Download all 56 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.