iqow-tsi-signal-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.
- Momentum
- Marker companion
- On price
- Intermediate
Draws the HIGHER and LOWER markers of the TSI Signal Cross script on the price chart, above and below the candles, so they show on every asset, JPY pairs included. No lines: add TSI Signal Cross as well for the TSI and signal lines.
This is the price-chart companion of TSI Signal 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
TSI(25, 13) crosses above its EMA(7) signal line while TSI is below zero.
LOWER marker
TSI(25, 13) crosses below its EMA(7) signal line while TSI is above zero.
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 TSI Signal Cross. A marker appears after the next candle opens and does not move. The script draws no line, so add TSI Signal Cross (it opens in its own panel) to see the TSI and signal lines. Both scripts use the same settings.
Indicators used
- True Strength Index (25, 13)
- EMA signal (7)
Same view with built-in indicators: Add True Strength Indicator (25, 13) with a signal line EMA of 7 from the IQ Option indicator list.
Default settings
| Long period | 25 |
|---|---|
| Short period | 13 |
| Signal EMA period | 7 |
Every value is an input in the script settings. Platform advice is off by default.
Key points
- This is the price-chart companion of TSI Signal 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 TSI Signal Cross to see the TSI and signal lines in its own panel.
- Test both on a Practice balance first.
Limitations. Same setup and same limits as TSI Signal 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: 63d0676ada77cfa660f0f4cad0c1376891786729d4e0b1a3476ee2929de1fc45
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW TSI Signal Cross Markers v1.0.0
--
-- Price-chart companion of IQOW TSI Signal Cross (tsi-signal-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 TSI Signal
-- Cross as well to see the TSI and signal lines. Keep the settings of both
-- scripts equal.
--
-- The True Strength Index (TSI) double-smooths price change and shows
-- momentum direction. A cross of the TSI line through its EMA signal line
-- is used as the timing event; the zero line adds context.
--
-- HIGHER: TSI(25, 13) crosses above its signal line (EMA 7) while TSI is below zero.
-- LOWER: TSI(25, 13) crosses below its signal line while TSI is above zero.
--
-- 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 TSI Signal Cross Markers",
short_name = "MK TSI",
overlay = true
}
input_group {
"1. True Strength Index",
long_period = input (25, "Long period", input.integer, 2, 100),
short_period = input (13, "Short period", input.integer, 2, 100),
signal_period = input (7, "Signal EMA period", input.integer, 2, 50)
}
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 }
}
-- True Strength Index: double-smoothed price change over double-smoothed
-- absolute change, as in the official indicator.
price_change = change (close)
smoothed_change = ema (ema (price_change, long_period), short_period)
smoothed_abs_change = ema (ema (abs (price_change), long_period), short_period)
tsi_value = 100 * smoothed_change / max (smoothed_abs_change, 1e-10)
signal_line = ema (tsi_value, signal_period)
-- Current-bar scalars for the Lua rule logic.
local tsi_now = get_value (tsi_value, nil)
local tsi_before = get_value (tsi_value [1], nil)
local signal_now = get_value (signal_line, nil)
local signal_before = get_value (signal_line [1], nil)
local data_is_ready =
tsi_now ~= nil and
tsi_before ~= nil and
signal_now ~= nil and
signal_before ~= nil and
get_value (tsi_value [long_period + short_period], nil) ~= nil
-- Event: TSI crosses its signal line on this candle, on the matching side of zero.
higher_setup = conditional (
data_is_ready and tsi_before <= signal_before and tsi_now > signal_now and tsi_now < 0
)
lower_setup = conditional (
data_is_ready and tsi_before >= signal_before and tsi_now < signal_now and tsi_now > 0
)
-- 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,
"TSI HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"TSI 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
- Own panel
- Beginner
Ultimate Oscillator Cross
Marks the Ultimate Oscillator leaving its oversold or overbought zone. The oscillator blends three periods, so it reacts more evenly than a single-period oscillator.
Indicators: Ultimate Oscillator (7, 14, 28)
- Momentum
- Own panel
- Intermediate
Woodies CCI
Marks a Woodies CCI zero-line cross: the 14-period CCI changes side after six candles on the other side, while the faster Turbo CCI already agrees. The zero line is the baseline the article uses to define trend side.
Indicators: CCI (14) · Turbo CCI (6)
- Momentum
- Context indicator
- Own panel
- Beginner
Price EMA Distance Percent
Shows how far the selected price source is above or below an EMA in percentage terms. A configurable reference zone helps compare the current distance with your chosen scale.
Indicators: EMA (20) distance in %
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.