将其添加到 IQ Option 在3步骤中
- 获取文件。 点击“获取脚本”。浏览器会保存一个 .lua 文件。
- 导入 IQ Option. 在模拟账户中打开网页交易室。点击图表左下角的波浪图标,打开“脚本”选项卡,点击“导入脚本”并选择文件。
- 将其添加到图表中。 代码会在编辑器中打开。点击代码下方的加号按钮(添加到图表)。只有在编辑完代码后才需要保存。
风险。 交易可能亏损。标记是基于图表观察得出的结论,并非预测,且此脚本已在测试数据上验证,未经实盘交易验证。请先在模拟账户上进行测试。
- 翻转
- 关于价格
- 初学者
当RSI处于低位或高位区域时,RSI会标记出看涨或看跌的孕线形态。RSI有助于判断该货币对是否会朝着相反的方向发展。
规则
更高标记
一根完整的阴线,紧接着一根阳线,阳线的实体最多为第一根阴线的 50%,并且完全包含在第一根阴线之内,RSI(14) 低于 40。
下限标记
一根完整的阳线之后紧接着一根阴线,阴线的实体最多只有第一根阳线实体的 50%,并且完全包含在第一根阳线内部,RSI(14) 指标高于 60。
下一个K线开盘后,会在完成该形态的K线上绘制一个标记。这只是一个图表观察结果,并非交易指令。
如何阅读它
图表上没有线条;请解读K线。绿色“上升”三角形表示看涨孕线的第二根K线,红色“下降”三角形表示看跌孕线的第二根K线。RSI阈值是脚本中的输入参数。
使用的指标
- 孕线蜡烛对
- RSI(14,40/60)
视图相同,但带有内置指示器: 将 RSI (14) 与 40 和 60 水平线结合,用肉眼识别孕线对。
默认设置
| 第一根K线的最小实体占比范围 | 0.5 |
|---|---|
| 第二根K线的最大实体占第一根K线实体的比例 | 0.5 |
| RSI时期 | 14 |
| 看涨RSI水平 | 40 |
| 看跌RSI水平 | 60 |
每个值都是脚本设置中的一个输入项。平台提示默认关闭。
关键点
- 哈拉米蜡烛由两根蜡烛组成:一根大蜡烛和一根颜色相反的小蜡烛,它们位于哈拉米蜡烛内部。
- 小蜡烛图显示之前的走势正在放缓。
- 看涨孕线需要 RSI 低于 40,看跌孕线需要 RSI 高于 60。
- 这与内部柱状图不同,内部柱状图比较的是最高点和最低点,而不是柱状图本身。
- 标记物确认蜡烛已完成。
- 在练习平衡板上进行练习,并观察每种模式的趋势。
局限性。 文章并未给出确切的尺寸或RSI规则,因此50%的实体限制和40/60 RSI水平是该脚本对该形态的定义。孕线只是暂时的停顿,走势可能继续朝之前的方向发展。在投入真金白银之前,请先在模拟账户中进行测试。
完整的源代码
下载和预览指向的是同一个已审核文件。SHA-256:c78b209f6021cb5b6fcf0955e3eb1ffe1e91768d62036b742b4307b5cb5c6aa2
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Harami RSI v1.0.1
--
-- A harami is a two-candle pattern: a full candle followed by a small
-- opposite-colour candle whose body sits inside the first candle's body.
-- RSI checks that the pattern appears after a push into an oversold or
-- overbought area.
--
-- RSI follows IQ Option's built-in RSI: closing prices, with the average gain
-- and the average loss smoothed by an exponential average (alpha 2 / (period +
-- 1)). Version 1.0.1 (9 October 2026) changed this from Wilder smoothing; the
-- inputs, periods and levels are unchanged.
--
-- HIGHER: candle 1 is a full bearish candle, candle 2 (this candle) is
-- bullish with a body at most 50% of candle 1's body and fully
-- inside it, and RSI(14) is below 40.
-- LOWER: mirror image, with RSI(14) above 60.
--
-- 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 Harami RSI",
short_name = "IQOW HARAMI",
overlay = true
}
input_group {
"1. Candle geometry",
first_body_ratio = input (0.5, "First candle: minimum body share of range", input.double, 0.1, 0.95, 0.05, false),
max_body_ratio = input (0.5, "Second candle: maximum body share of first body", input.double, 0.05, 0.95, 0.05, false)
}
input_group {
"2. RSI",
rsi_period = input (14, "RSI period", input.integer, 2, 100),
oversold_level = input (40, "Bullish harami: RSI below", input.double, 5, 50, 1, false),
overbought_level = input (60, "Bearish harami: RSI above", input.double, 50, 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 }
}
-- RSI as IQ Option's built-in RSI draws it: the average gain and the average
-- loss are exponential averages (alpha = 2 / (period + 1)), not Wilder's
-- smoothing (alpha = 1 / period). It stays empty until both averages exist and
-- is 50 when price did not move at all.
rsi_change = close - close [1]
rsi_gain = ema (max (rsi_change, 0), rsi_period)
rsi_loss = ema (max (-rsi_change, 0), rsi_period)
rsi_total = rsi_gain + rsi_loss
rsi_value = iff (rsi_total > 0, 100 * rsi_gain / rsi_total, rsi_total + 50)
-- Candle 1 is the previous bar, candle 2 is this bar.
local open_1 = get_value (open [1], nil)
local close_1 = get_value (close [1], nil)
local high_1 = get_value (high [1], nil)
local low_1 = get_value (low [1], nil)
local open_2 = get_value (open, nil)
local close_2 = get_value (close, nil)
local rsi_now = get_value (rsi_value, nil)
local levels_are_valid = oversold_level < overbought_level
local data_is_ready =
levels_are_valid and
open_1 ~= nil and close_1 ~= nil and high_1 ~= nil and low_1 ~= nil and
open_2 ~= nil and close_2 ~= nil and
rsi_now ~= nil
local body_1 = data_is_ready and math.abs (close_1 - open_1) or 0
local range_1 = data_is_ready and (high_1 - low_1) or 0
local body_2 = data_is_ready and math.abs (close_2 - open_2) or 0
local first_is_full = range_1 > 0 and body_1 >= first_body_ratio * range_1
local second_is_small = body_1 > 0 and body_2 > 0 and body_2 <= max_body_ratio * body_1
-- Bullish harami: bearish candle 1, bullish candle 2 with both open and
-- close inside candle 1's body (between its close and open).
local bullish_harami =
data_is_ready and first_is_full and second_is_small and
close_1 < open_1 and close_2 > open_2 and
open_2 >= close_1 and close_2 <= open_1 and
rsi_now < oversold_level
local bearish_harami =
data_is_ready and first_is_full and second_is_small and
close_1 > open_1 and close_2 < open_2 and
open_2 <= close_1 and close_2 >= open_1 and
rsi_now > overbought_level
higher_setup = conditional (bullish_harami)
lower_setup = conditional (bearish_harami)
-- 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 signals_visible then
plot_shape (
confirmed_higher,
"Harami HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"Harami 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
更多反转脚本
- 翻转
- 自有面板
- 中级
Fisher变换反转
当指标处于极端区域时,Fisher变换曲线与其触发线发生交叉。这正是相关文章中描述的“极端-交叉”确认信号。
指标: 埃勒斯-费舍尔变换(10)
- 翻转
- 关于价格
- 先进的
跳跃渐变
标志着第一个1分钟K线出现异常波动,与过去120根K线的走势形成鲜明对比,预期会出现短暂的反弹。此外,研究还发现,Supertrend(10, 3)指标也需要与此趋势相悖。
指标: 单根蜡烛图对数收益率 z 分数 (120) · 超级趋势 (10, 3),需要表示不同意
- 翻转
- 自有面板
- 中级
KDJ Cross
标记 K/D 交叉点,该交叉点发生在较快的 J 线已经拉伸到 20 以下或 80 以上时。J 线首先达到极端值,因此其后的交叉点被用作计时事件。
指标: KDJ(9, 3, 3)
下载全部 74 个脚本,打包成一个 ZIP 文件 · 本软件采用 MIT 许可证,按“原样”提供,不提供任何担保。IQOptionWiki 独立于…… IQ Option 平台运营商。本平台内容不构成投资建议或收益保证。