iqow-schaff-trend-cycle-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.
- Momentum
- Marker companion
- On price
- Intermediate
Draws the HIGHER and LOWER markers of the Schaff Trend Cycle script on the price chart, above and below the candles, so they show on every asset, JPY pairs included. No lines: add Schaff Trend Cycle as well for the Schaff Trend Cycle line.
This is the price-chart companion of Schaff Trend Cycle. 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
STC(10, 23, 50) crosses above 25 on a candle; the marker confirms on the previous completed candle.
LOWER marker
STC(10, 23, 50) crosses below 75 on a candle; the marker confirms on the previous completed 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 Schaff Trend Cycle. A marker appears after the next candle opens and does not move. The script draws no line, so add Schaff Trend Cycle (it opens in its own panel) to see the Schaff Trend Cycle line. Both scripts use the same settings.
Indicators used
- Schaff Trend Cycle (10, 23, 50)
Same view with built-in indicators: Add Schaff Trend Cycle (10, 23, 50) from the IQ Option indicator list, with levels 25 and 75.
Default settings
| Cycle period | 10 |
|---|---|
| Short EMA | 23 |
| Long EMA | 50 |
| Low level | 25 |
| High level | 75 |
Every value is an input in the script settings. Platform advice is off by default.
Key points
- This is the price-chart companion of Schaff Trend Cycle: 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 Schaff Trend Cycle to see the Schaff Trend Cycle line in its own panel.
- Test both on a Practice balance first.
Limitations. Same setup and same limits as Schaff Trend Cycle: 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: 74804bc4f6c53a1b38e2495b6e5a5b3622d17b0170c0acb4faa36a1d71617903
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Schaff Trend Cycle Markers v1.0.0
--
-- Price-chart companion of IQOW Schaff Trend Cycle (schaff-trend-cycle). 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
-- Schaff Trend Cycle as well to see the Schaff Trend Cycle line. Keep the
-- settings of both scripts equal.
--
-- The Schaff Trend Cycle (STC) applies a double stochastic smoothing to the
-- MACD of two EMAs. It moves between 0 and 100 faster than the MACD itself.
-- Formula follows the official IQ Option Schaff Trend Cycle indicator.
--
-- HIGHER: STC crosses above 25 (leaves the low zone).
-- LOWER: STC crosses below 75 (leaves the high zone).
--
-- 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 Schaff Trend Cycle Markers",
short_name = "MK STC",
overlay = true
}
input_group {
"1. Schaff Trend Cycle",
cycle_period = input (10, "Cycle period", input.integer, 2, 100),
short_cycle = input (23, "Short EMA", input.integer, 2, 100),
long_cycle = input (50, "Long EMA", input.integer, 3, 250)
}
input_group {
"2. Levels",
low_level = input (25, "Low level", input.double, 5, 45, 1, false),
high_level = input (75, "High level", input.double, 55, 95, 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 }
}
-- MACD of two EMAs on the close.
macd_line = ema (close, short_cycle) - ema (close, long_cycle)
-- First stochastic of the MACD, then smoothed (factor 0.5).
local smoothing_factor = 0.5
macd_low = lowest (macd_line, cycle_period)
macd_range = highest (macd_line, cycle_period) - macd_low
first_stoch = iff (macd_range > 0, ((macd_line - macd_low) / macd_range) * 100, nz (first_stoch [1]))
first_smooth = iff (na (first_smooth [1]), first_stoch, first_smooth [1] + smoothing_factor * (first_stoch - first_smooth [1]))
-- Second stochastic on the smoothed series, then smoothed again.
smooth_low = lowest (first_smooth, cycle_period)
smooth_range = highest (first_smooth, cycle_period) - smooth_low
second_stoch = iff (smooth_range > 0, ((first_smooth - smooth_low) / smooth_range) * 100, nz (second_stoch [1]))
stc_value = iff (na (stc_value [1]), second_stoch, stc_value [1] + smoothing_factor * (second_stoch - stc_value [1]))
-- Current-bar scalars for the Lua rule logic.
local stc_now = get_value (stc_value, nil)
local stc_before = get_value (stc_value [1], nil)
local settings_are_valid = short_cycle < long_cycle and low_level < high_level
local data_is_ready =
settings_are_valid and
stc_now ~= nil and
stc_before ~= nil and
get_value (stc_value [long_cycle + cycle_period * 2], nil) ~= nil
-- Event: STC crosses a level on this candle.
higher_setup = conditional (
data_is_ready and stc_before <= low_level and stc_now > low_level
)
lower_setup = conditional (
data_is_ready and stc_before >= high_level and stc_now < high_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,
"STC HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"STC 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 momentum scripts
- Momentum
- Signal engine
- On price
- Advanced
IQ_WIKI_SCRIP_V1.1.0
A completed-candle adaptation of the regular IQOptionWiki Signals score. It weighs RSI, MACD, Bollinger %B, five directional candle patterns and optional chart-volume confirmation into one score and marks new qualifying setups.
Indicators: RSI · MACD · Bollinger %B (population deviation) · Five candlestick patterns · Optional chart volume
- Momentum
- Signal engine
- On price
- Advanced
IQ_WIKI_BINARY_SIGNAL_GUN_V1.1.0
A stricter local confluence engine with weighted RSI, ATR-normalized MACD, Bollinger and pattern-family votes. Optional strategy alignment must agree with the base direction.
Indicators: Weighted RSI · ATR-normalized MACD · Bollinger · Pattern families · ATR risk
- Momentum
- On price
- Beginner
Awesome Oscillator SMA
Marks the candle on which the Awesome Oscillator crosses zero in the direction of the 100-period SMA. The SMA acts as a simple trend filter for the oscillator.
Indicators: Awesome Oscillator (5, 34) · SMA (100)
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.