iqow-rsi-ema200-engulfing.lua 5 KB · 免费,MIT 许可证
如报名参加 IQ Option 网络交易室。Quadcode 在移动设备上不会绘制“更高”和“更低”标记。
将其添加到 IQ Option 在3步骤中
- 获取文件。 点击“获取脚本”。浏览器会保存一个 .lua 文件。
- 导入 IQ Option. 在模拟账户中打开网页交易室。点击图表左下角的波浪图标,打开“脚本”选项卡,点击“导入脚本”并选择文件。
- 将其添加到图表中。 代码会在编辑器中打开。点击代码下方的加号按钮(添加到图表)。只有在编辑完代码后才需要保存。
风险。 交易可能亏损。标记是基于图表观察得出的结论,并非预测,且此脚本已在测试数据上验证,未经实盘交易验证。请先在模拟账户上进行测试。
- 价格行动
- 关于价格
- 中级
这根K线形成了一个吞没形态,其方向与200日长期EMA均线和50日RSI中线一致。EMA和RSI会过滤掉与整体趋势相反的吞没形态。
观看:安装并跟随练习交易。
规则
更高标记
一根阳线的实体完全吞没了前一根阴线的实体,收盘价高于 200 日均线,同时 RSI(14) 高于 50。
下限标记
一根阴线完全吞没了前一根阳线,收盘价低于 EMA 200,同时 RSI(14) 低于 50。
下一个K线开盘后,会在完成该形态的K线上绘制一个标记。这只是一个图表观察结果,并非交易指令。
如何阅读它
价格图表上的黄线是 200 日均线 (EMA)。蜡烛图下方的绿色高三角形表示收盘价高于 EMA 且 RSI 高于 50 的看涨吞没形态;蜡烛图上方的红色低三角形表示收盘价低于 EMA 且 RSI 低于 50 的看跌吞没形态。价格图表上未绘制 RSI 指标。
使用的指标
- EMA(200)
- RSI(14,中线 50)
- 吞噬蜡烛
视图相同,但带有内置指示器: 添加周期为 200 的指数移动平均线和周期为 14 的 RSI(单线,水平为 50),然后凭肉眼寻找吞没形态。
默认设置
| EMA周期 | 200 |
|---|---|
| RSI时期 | 14 |
| RSI中线 | 50 |
每个值都是脚本设置中的一个输入项。平台提示默认关闭。
关键点
- 这种形态结合了三样东西:EMA 200、RSI 50 线和吞没形态。
- 200日均线显示的是长期走势。价格高于该均线时倾向于上涨,低于该均线时倾向于下跌。
- RSI高于50表示近期涨幅大于近期跌幅;低于50则表示跌幅大于近期跌幅。
- 如果一根阳线完全吞没了前一根阴线,且位于 EMA 上方,RSI 指标高于 50,则该阳线被标记为“更高”。
- 低于 EMA 且 RSI 低于 50 的看跌版本标记为“LOWER”。
- 标记会在蜡烛图收盘后出现。请先在模拟账户上测试。
局限性。 吞没形态较为罕见,因此相关指标也较少,在走势平稳的图表上,这些指标可能非常小。在横盘整理的市场中,价格通常会在长指数移动平均线(EMA)附近波动,此时EMA的侧面意义不大。在投入真实资金之前,请先在模拟账户中进行测试。
完整的源代码
下载的文件和预览文件指向的是同一个已审核的文件。SHA-256:6970a74fe46ec55b192162d9feba641ad1b2ce69c8eef6ff4da8acc59fc24e75
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW RSI EMA200 Engulfing v1.0.1
--
-- Combines a candlestick pattern with two trend filters. The EMA 200 gives the
-- long-term side of the market and RSI(14) against the 50 line gives the
-- medium-term momentum side. An engulfing candle is the trigger.
--
-- 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: a bullish candle whose body engulfs the previous bearish body
-- closes above EMA 200 while RSI(14) is above 50.
-- LOWER: a bearish candle whose body engulfs the previous bullish body
-- closes below EMA 200 while RSI(14) is below 50.
--
-- 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 RSI EMA200 Engulfing",
short_name = "IQOW ENGULF",
overlay = true
}
input_group {
"1. Trend filter",
ema_period = input (200, "EMA period", input.integer, 2, 500)
}
input_group {
"2. RSI",
rsi_period = input (14, "RSI period", input.integer, 2, 100),
rsi_midline = input (50, "RSI midline", input.double, 30, 70, 1, false)
}
input_group {
"Display and advice",
ema_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",
ema_color = input { default = "#DBCF0D", type = input.color },
ema_width = input { default = 2, 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 }
}
ema_line = ema (close, ema_period)
-- 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)
-- Current-bar scalars for the Lua rule logic.
local open_now = get_value (open, nil)
local close_now = get_value (close, nil)
local open_previous = get_value (open [1], nil)
local close_previous = get_value (close [1], nil)
local ema_now = get_value (ema_line, nil)
local rsi_now = get_value (rsi_value, nil)
-- Wait until the EMA has a full period of history behind it.
local has_history = get_value (close [ema_period], nil) ~= nil
local data_is_ready =
has_history and
open_now ~= nil and
close_now ~= nil and
open_previous ~= nil and
close_previous ~= nil and
ema_now ~= nil and
rsi_now ~= nil
-- Bullish engulfing: a bearish candle followed by a bullish candle whose body
-- covers the whole previous body.
local bullish_engulfing =
data_is_ready and
close_previous < open_previous and
close_now > open_now and
open_now <= close_previous and
close_now >= open_previous
-- Bearish engulfing: a bullish candle followed by a bearish candle whose body
-- covers the whole previous body.
local bearish_engulfing =
data_is_ready and
close_previous > open_previous and
close_now < open_now and
open_now >= close_previous and
close_now <= open_previous
higher_setup = conditional (
bullish_engulfing and close_now > ema_now and rsi_now > rsi_midline
)
lower_setup = conditional (
bearish_engulfing and close_now < ema_now and rsi_now < rsi_midline
)
-- 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 ema_visible then
plot (ema_line, "EMA 200", ema_color, ema_width)
end
if signals_visible then
plot_shape (
confirmed_higher,
"ENGULF HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"ENGULF 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
更多价格走势脚本
- 价格行动
- 关于价格
- 中级
布林格牌
这种形态的针形线,其长影线延伸至布林带外侧,而线身则回落至内侧。布林带显示价格被拉伸的位置;针形线则表明这种拉伸被拒绝。
指标: 布林带(20,2)· 针形K线几何形状
- 价格行动
- 关于价格
- 中级
销钉杆内杆
根据相关文章,查找针形线和内包线组合:一根拒绝K线之后紧接着一根K线维持在其价格区间内。当价格随后收盘价突破针形线并沿影线方向移动时,标记就会出现。
指标: 针形K线几何形状 · 内包线形态
- 价格行动
- 关于价格
- 初学者
三根蜡烛续篇
标记显示,当价格位于 20 日均线 (EMA 20) 的对应侧时,连续三根颜色相同的饱满蜡烛收盘价稳定。该期权可以将读数反转为文章中描述的逆势交易策略。
指标: 三根完整蜡烛图 · EMA(20)
下载全部 74 个脚本,打包成一个 ZIP 文件 · 本软件采用 MIT 许可证,按“原样”提供,不提供任何担保。IQOptionWiki 独立于…… IQ Option 平台运营商。本平台内容不构成投资建议或收益保证。