iqow-demarker-30-70-cross-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
- 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.
- Reversal
- Marker companion
- On price
- Beginner
Draws the HIGHER and LOWER markers of the DeMarker 30 70 Cross script on the price chart, above and below the candles, so they show on every asset, JPY pairs included. No lines: add DeMarker 30 70 Cross as well for the DeMarker line.
This is the price-chart companion of DeMarker 30 70 Cross. 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.
The rules
HIGHER marker
DeMarker(14) closes above 30 after being at or below 30 on the previous candle.
LOWER marker
DeMarker(14) closes below 70 after being at or above 70 on the previous candle.
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 DeMarker 30 70 Cross. A marker appears after the next candle opens and does not move. The script draws no line, so add DeMarker 30 70 Cross (it opens in its own panel) to see the DeMarker line. Both scripts use the same settings.
Indicators used
- DeMarker (14, levels 30/70)
Same view with built-in indicators: Add IQ Option's DeMarker indicator with period 14, overbought 70 and oversold 30.
Default settings
| Period | 14 |
|---|---|
| Oversold level | 30 |
| Overbought level | 70 |
Every value is an input in the script settings. Platform advice is off by default.
Key points
- This is the price-chart companion of DeMarker 30 70 Cross: the same rule, the same settings and the same HIGHER and LOWER markers.
- 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.
- The companion draws them above and below the candles instead, so they show on every asset.
- Each marker sits on the candle that completed the setup and appears after the next candle opens; it does not move or disappear.
- It draws no lines: add DeMarker 30 70 Cross to see the DeMarker line in its own panel.
- Test both on a Practice balance first.
Limitations. Same setup and same limits as DeMarker 30 70 Cross: 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.
Complete source code
The download and this preview resolve to the same reviewed file. SHA-256: d5116919cc53ae5834f9d9adb3bcaec390a2ae2686f36bb7f8d9635afe02ac21
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW DeMarker 30 70 Cross Markers v1.0.0
--
-- Price-chart companion of IQOW DeMarker 30 70 Cross (demarker-30-70-cross).
-- 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
-- DeMarker 30 70 Cross as well to see the DeMarker line. Keep the settings of
-- both scripts equal.
--
-- DeMarker(14) compares each candle's new highs and new lows with the
-- previous candle, then scales the result to 0-100 (formula from the official
-- Quadcode DeMarker script). Low values mean sellers keep making new lows;
-- high values mean buyers keep making new highs.
--
-- HIGHER: DeMarker closes above the oversold level (30) after being at or
-- below it on the previous candle.
-- LOWER: DeMarker closes below the overbought level (70) after being at or
-- above it on the previous candle.
--
-- 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 DeMarker 30 70 Cross Markers",
short_name = "MK DEM 30/70",
overlay = true
}
input_group {
"1. DeMarker settings",
dem_period = input (14, "Period", input.integer, 2, 100),
oversold_level = input (30, "Oversold level", input.double, 1, 49, 1, false),
overbought_level = input (70, "Overbought level", input.double, 51, 99, 1, false)
}
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 }
}
-- DeMarker: average of new highs over the sum of new highs and new lows.
dem_max = max (high - high [1], 0)
dem_min = max (low [1] - low, 0)
average_max = sma (dem_max, dem_period)
average_min = sma (dem_min, dem_period)
total_range = average_max + average_min
-- A flat market (no new highs or lows) reads as neutral 50.
dem_value = iff (total_range > 0, 100 * average_max / max (total_range, 1e-10), 50)
-- Current-bar scalars for the Lua rule logic.
local dem_now = get_value (dem_value, nil)
local dem_previous = get_value (dem_value [1], nil)
local levels_are_valid = oversold_level < overbought_level
local data_is_ready =
levels_are_valid and
dem_now ~= nil and
dem_previous ~= nil
-- Event: DeMarker closes back across a level on this candle.
higher_setup = conditional (
data_is_ready and dem_previous <= oversold_level and dem_now > oversold_level
)
lower_setup = conditional (
data_is_ready and dem_previous >= overbought_level and dem_now < overbought_level
)
-- 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,
"DEM HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"DEM 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
- Beginner
Envelopes RSI
Marks a bounce from the Envelope lines: a candle reaches the outer line, closes back inside, and RSI confirms that price was stretched. It follows the 'bounce from the sides' method in the related article.
Indicators: Moving Average Envelopes (SMA 20, deviation 1) · RSI (14, 35/65)
- Reversal
- Own panel
- Intermediate
Fisher Transform Reversal
Marks a Fisher Transform cross of its trigger line while the indicator is in an extreme zone. This is the extreme-then-cross confirmation the related article describes.
Indicators: Ehlers Fisher Transform (10)
- Reversal
- On price
- Beginner
Harami RSI
Marks bullish and bearish harami candle pairs when RSI is in a low or high zone. RSI helps check that the pair follows a push in the opposite direction.
Indicators: Harami candle pair · RSI (14, 40/60)
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.