iqow-three-candles-continuation.lua 5 KB · 免费,MIT 许可证
如报名参加 IQ Option 网络交易室。Quadcode 在移动设备上不会绘制“更高”和“更低”标记。
将其添加到 IQ Option 在3步骤中
- 获取文件。 点击“获取脚本”。浏览器会保存一个 .lua 文件。
- 导入 IQ Option. 在模拟账户中打开网页交易室。点击图表左下角的波浪图标,打开“脚本”选项卡,点击“导入脚本”并选择文件。
- 将其添加到图表中。 代码会在编辑器中打开。点击代码下方的加号按钮(添加到图表)。只有在编辑完代码后才需要保存。
风险。 交易可能亏损。标记是基于图表观察得出的结论,并非预测,且此脚本已在测试数据上验证,未经实盘交易验证。请先在模拟账户上进行测试。
- 价格行动
- 关于价格
- 初学者
标记显示,当价格位于 20 日均线 (EMA 20) 的对应侧时,连续三根颜色相同的饱满蜡烛收盘价稳定。该期权可以将读数反转为文章中描述的逆势交易策略。
规则
更高标记
连续三根阳线,每根阳线的实体至少占其波动范围的 50%,并且收盘价高于前一根,第三根收盘价高于 20 日均线。
下限标记
连续三根阴线,每根阴线的实体至少占其波动范围的 50%,且收盘价低于前一根阴线,第三根阴线的收盘价低于 20 日均线。
下一个K线开盘后,会在完成该形态的K线上绘制一个标记。这只是一个图表观察结果,并非交易指令。
如何阅读它
橙色线是 20 日均线 (EMA)。在上涨行情中,绿色“上升”三角形会在第三根K线出现一次;在下跌行情中,红色“下降”三角形会在第三根K线出现一次;较长的行情周期只会标记一次。启用逆势交易选项后,标记会互换,EMA 过滤器也会被忽略。
使用的指标
- 三根满的蜡烛
- EMA(20)
视图相同,但带有内置指示器: 添加 EMA(20),并目测数出三根颜色相同的饱满蜡烛。
默认设置
| 最小身体份额范围 | 0.5 |
|---|---|
| EMA周期 | 20 |
| 逆势阅读 | 折扣 |
每个值都是脚本设置中的一个输入项。平台提示默认关闭。
关键点
- 连续三根颜色相同的蜡烛表示一方占据优势。
- 我们只统计有实体的蜡烛,所以十字星和小蜡烛不符合条件。
- 每次收盘价都必须高于前一次收盘价。
- 运行必须与 EMA 20 一致,并且只标记第一次完成。
- 文章使用了相同的走势作为逆势策略,因此脚本中有一个用于该解读的开关。
- 比较练习平衡表上的两个读数。
局限性。 文章中将三根同色K线解读为预期下一根K线颜色相反,而此脚本默认按照其名称所示的延续性解读;请使用“逆势”选项来查看文章中的版本。长期走势通常意味着价格已经延伸,而50%的实体占比默认值是对文章中完整实体K线的调整。在投入真实资金之前,请先在模拟账户中进行测试。
完整的源代码
下载和预览指向的是同一个已审核文件。SHA-256:0bbcb70a61a03875e539aef9a9309a70b00c59953dfa6ab61325699185a3d404
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Three Candles Continuation v1.0.0
--
-- Marks the candle that completes a run of three same-colour candles with
-- steady closes, when price is on the matching side of EMA 20. Candles must
-- have a real body so doji and tiny candles do not count. One marker per run.
--
-- HIGHER: three bullish candles in a row, each closing above the previous
-- close, with the third close above EMA 20.
-- LOWER: three bearish candles in a row, each closing below the previous
-- close, with the third close below EMA 20.
--
-- The related article reads the same three-candle run as a counter-trend
-- idea. Switch on "Counter-trend reading" to flip the markers: a bullish run
-- is then marked LOWER and a bearish run HIGHER, and the EMA filter is off.
--
-- 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 Three Candles Continuation",
short_name = "IQOW 3 CANDLES",
overlay = true
}
input_group {
"1. Candle run",
min_body_ratio = input (0.5, "Minimum body as share of range", input.double, 0.1, 0.95, 0.05, false),
counter_trend = input { default = false, name = "Counter-trend reading (article)", type = input.boolean }
}
input_group {
"2. Trend filter",
ema_period = input (20, "EMA period", input.integer, 2, 300)
}
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 = "#FFB800", type = input.color },
line_width = input { default = 1, 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_value = ema (close, ema_period)
local ema_now = get_value (ema_value, nil)
-- A "full" candle has a body of at least min_body_ratio of its range.
-- Zero-range candles never qualify.
full_bullish = conditional (
get_value (high - low, 0) > 0 and
get_value (close - open, 0) >= min_body_ratio * get_value (high - low, 0)
)
full_bearish = conditional (
get_value (high - low, 0) > 0 and
get_value (open - close, 0) >= min_body_ratio * get_value (high - low, 0)
)
-- Wait until the EMA has a full period of history behind it.
local data_is_ready =
ema_now ~= nil and
get_value (close [ema_period], nil) ~= nil and
get_value (close [2], nil) ~= nil
local three_up =
data_is_ready and
get_value (full_bullish, false) and
get_value (full_bullish [1], false) and
get_value (full_bullish [2], false) and
close > close [1] and close [1] > close [2]
local three_down =
data_is_ready and
get_value (full_bearish, false) and
get_value (full_bearish [1], false) and
get_value (full_bearish [2], false) and
close < close [1] and close [1] < close [2]
local above_ema = data_is_ready and get_value (close, 0) > ema_now
local below_ema = data_is_ready and get_value (close, 0) < ema_now
-- Continuation: run in the direction of EMA 20. Counter-trend: flipped, no EMA.
higher_setup = conditional (
iff (counter_trend, three_down, three_up and above_ema)
)
lower_setup = conditional (
iff (counter_trend, three_up, three_down and below_ema)
)
-- 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_value, "EMA", ema_color, line_width)
end
if signals_visible then
plot_shape (
confirmed_higher,
"3 Candles HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"3 Candles 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
更多价格走势脚本
- 价格行动
- 关于价格
- 中级
RSI EMA200 吞没形态
这根K线形成了一个吞没形态,其方向与200日长期EMA均线和50日RSI中线一致。EMA和RSI会过滤掉与整体趋势相反的吞没形态。
指标: EMA(200)· RSI(14,中线 50)· 吞没形态
- 价格行动
- 关于价格
- 中级
大体渐变
这根K线标志着一波异常强劲的K线出现:实体至少为2倍ATR,而ADX指标处于或高于近期中位数。市场预期该波行情将出现短暂的反弹。
指标: ATR(14) · ADX(14) 与其最近 100 个值比较
- 价格行动
- 关于价格
- 初学者
酒吧内部突破
标志着在出现内包线后,首次收盘价突破母线,且突破发生在 3 根 K 线以内,并沿 50 日均线方向。内包线显示短暂的停顿;突破则显示了停顿的最终方向。
指标: 内包线形态 · EMA(50)
下载全部 74 个脚本,打包成一个 ZIP 文件 · 本软件采用 MIT 许可证,按“原样”提供,不提供任何担保。IQOptionWiki 独立于…… IQ Option 平台运营商。本平台内容不构成投资建议或收益保证。