iqow-ichimoku-kijun-cloud.lua 6 KB · 免费,MIT 许可证
如报名参加 IQ Option 网络交易室。Quadcode 在移动设备上不会绘制“更高”和“更低”标记。
将其添加到 IQ Option 在3步骤中
- 获取文件。 点击“获取脚本”。浏览器会保存一个 .lua 文件。
- 导入 IQ Option. 在模拟账户中打开网页交易室。点击图表左下角的波浪图标,打开“脚本”选项卡,点击“导入脚本”并选择文件。
- 将其添加到图表中。 代码会在编辑器中打开。点击代码下方的加号按钮(添加到图表)。只有在编辑完代码后才需要保存。
风险。 交易可能亏损。标记是基于图表观察得出的结论,并非预测,且此脚本已在测试数据上验证,未经实盘交易验证。请先在模拟账户上进行测试。
- 趋势
- 关于价格
- 先进的
当价格已经位于彩色一目均衡图云图的趋势侧时,基准线(Kijun-sen)的收盘价会再次穿过基准线。云图决定方向,基准线交叉决定时机。
观看:安装并跟随练习交易。
规则
更高标记
云层呈绿色(A 段位于 B 段之上),收盘价高于云层,并且收盘价在前一个收盘价位于基准线或基准线下方之后,又重新穿过基准线上方。
下限标记
云层呈红色(A 段低于 B 段),收盘价低于云层,并且收盘价在前一个收盘价位于基准线或基准线之上之后,又回到基准线之下。
下一个K线开盘后,会在完成该形态的K线上绘制一个标记。这只是一个图表观察结果,并非交易指令。
如何阅读它
阴影区域为云图:当 Span A 位于 Span B 上方时为绿色,否则为红色。蓝线为转换线 (Tenkan-sen),橙线为基准线 (Kijun-sen)。K 线下方的绿色高位三角形表示价格位于绿色云图上方,且刚刚收于基准线上方;K 线上方的红色低位三角形则表示价格位于红色云图下方,情况与之相反。
使用的指标
- 一目均衡图(9, 26, 52, 位移 26)
视图相同,但带有内置指示器: 添加 IQ Option的 Ichimoku 云与 Tenkan 9、Kijun 26 和 Senkou Span B 52。
默认设置
| 天干时期 | 9 |
|---|---|
| 纪纯时期 | 26 |
| 先高跨度B期 | 52 |
| 云位移 | 26 |
每个值都是脚本设置中的一个输入项。平台提示默认关闭。
关键点
- 一目均衡图看起来很复杂,但这种设置只使用了云图和基准线。
- 绿色云图表示跨度 A 位于跨度 B 之上。我们希望价格位于整个云图之上。
- 基准线是26根K线的中间点。价格回调至基准线下方,然后收盘价回升至基准线上方,这就是我们的交易时机。
- 三者合起来的等级是“更高”。
- 红色云层、低于该云层的价格以及收盘价低于基准线均被标记为“更低”。
- 与原生指标一样,云图向前移动了 26 根蜡烛图。请在模拟账户中测试。
局限性。 云图和基准线都是基于较长的时间窗口构建的,因此反应较慢,需要大约78根K线的历史数据。在横盘整理的市场中,价格会不断穿过基准线但始终保持在云图范围内,因此只有当价格明显超出基准线时,指标才会出现。在投入真实资金之前,请先在模拟账户中进行测试。
完整的源代码
下载和预览指向的是同一个已审核的文件。SHA-256:d4cd30abb5ac2a2618a59011b1eae505a2a3047f4d53ed78061813f79f9e21da
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Ichimoku Kijun Cloud v1.0.0
--
-- Ichimoku Cloud (9, 26, 52, displacement 26; formulas from the official
-- Quadcode script). The cloud colour gives the trend (Span A above Span B is
-- green), price outside the cloud confirms it, and a close back across the
-- Kijun-sen gives the timing.
--
-- HIGHER: green cloud (Span A above Span B), close above the cloud, and a
-- close back above the Kijun-sen after the previous close was at or
-- below it.
-- LOWER: red cloud (Span A below Span B), close below the cloud, and a
-- close back below the Kijun-sen after the previous close was at or
-- above it.
--
-- 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 Ichimoku Kijun Cloud",
short_name = "IQOW KIJUN",
overlay = true
}
input_group {
"1. Ichimoku settings",
tenkan_period = input (9, "Tenkan period", input.integer, 2, 100),
kijun_period = input (26, "Kijun period", input.integer, 2, 200),
span_b_period = input (52, "Senkou Span B period", input.integer, 2, 300),
displacement = input (26, "Cloud displacement", input.integer, 1, 100)
}
input_group {
"Display and advice",
lines_visible = input { default = true, type = input.plot_visibility },
cloud_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",
tenkan_color = input { default = rgba(86, 206, 255, 0.8), type = input.color },
kijun_color = input { default = "#FF9F43", type = input.color },
span_a_color = input { default = rgba(37, 225, 84, 0.7), type = input.color },
span_b_color = input { default = rgba(255, 108, 88, 0.7), type = input.color },
green_cloud_color = input { default = rgba(37, 225, 84, 0.15), type = input.color },
red_cloud_color = input { default = rgba(255, 108, 88, 0.15), 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 }
}
-- Ichimoku lines: midpoints of the highest high and lowest low.
tenkan_line = (highest (high, tenkan_period) + lowest (low, tenkan_period)) / 2
kijun_line = (highest (high, kijun_period) + lowest (low, kijun_period)) / 2
senkou_a = (tenkan_line + kijun_line) / 2
senkou_b = (highest (high, span_b_period) + lowest (low, span_b_period)) / 2
-- The cloud drawn at this candle was calculated `displacement` candles ago.
cloud_a = senkou_a [displacement]
cloud_b = senkou_b [displacement]
-- Current-bar scalars for the Lua rule logic.
local close_now = get_value (close, nil)
local close_previous = get_value (close [1], nil)
local kijun_now = get_value (kijun_line, nil)
local kijun_previous = get_value (kijun_line [1], nil)
local cloud_a_now = get_value (cloud_a, nil)
local cloud_b_now = get_value (cloud_b, nil)
-- The cloud needs the Span B period plus the displacement of history.
local has_history = get_value (close [span_b_period + displacement], nil) ~= nil
local data_is_ready =
has_history and
close_now ~= nil and
close_previous ~= nil and
kijun_now ~= nil and
kijun_previous ~= nil and
cloud_a_now ~= nil and
cloud_b_now ~= nil
local green_cloud = data_is_ready and cloud_a_now > cloud_b_now
local red_cloud = data_is_ready and cloud_a_now < cloud_b_now
-- Price outside the cloud: above the top edge, or below the bottom edge.
local above_cloud = data_is_ready and close_now > cloud_a_now and close_now > cloud_b_now
local below_cloud = data_is_ready and close_now < cloud_a_now and close_now < cloud_b_now
-- Event: the close crosses back over the Kijun-sen on this candle.
local crosses_above_kijun = data_is_ready and close_previous <= kijun_previous and close_now > kijun_now
local crosses_below_kijun = data_is_ready and close_previous >= kijun_previous and close_now < kijun_now
higher_setup = conditional (green_cloud and above_cloud and crosses_above_kijun)
lower_setup = conditional (red_cloud and below_cloud and crosses_below_kijun)
-- 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 cloud_visible then
fill (cloud_a, cloud_b, "Ichimoku cloud", iff (cloud_a > cloud_b, green_cloud_color, red_cloud_color))
end
if lines_visible then
plot (tenkan_line, "Tenkan-sen", tenkan_color, line_width)
plot (kijun_line, "Kijun-sen", kijun_color, line_width)
plot (cloud_a, "Senkou Span A", span_a_color, line_width)
plot (cloud_b, "Senkou Span B", span_b_color, line_width)
end
if signals_visible then
plot_shape (
confirmed_higher,
"KIJUN HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"KIJUN 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
更多趋势脚本
- 趋势
- 自有面板
- 中级
趋势强度指数
该指标标志着趋势强度指数进入强势区域:高于 80 表示上涨压力,低于 20 表示下跌压力,收盘价位于 60 周期简单移动平均线 (SMA) 的相应一侧。这是一个趋势强度入场标志,而非反转标志。
指标: 趋势强度指数(30日均线,60日均线)
- 趋势
- 关于价格
- 中级
VHF EMA 交叉
仅当垂直水平滤波器显示市场处于趋势行情时,才会标记 EMA 9 和 EMA 21 的交叉点。该滤波器会移除横盘整理期间发生的交叉点,因为此时移动平均线交叉往往不可靠。
指标: 垂直水平滤波器(28,0.35)· EMA(9)· EMA(21)
- 趋势
- 自有面板
- 中级
涡旋MACD
当MACD线位于其信号线的同一侧时,即为Vortex VI+/VI-交叉。Vortex交叉表明哪个方向占主导地位,而MACD则验证动量是否与之一致。
指标: 涡流指标 (21) · MACD (12, 26, 9)
下载全部 74 个脚本,打包成一个 ZIP 文件 · 本软件采用 MIT 许可证,按“原样”提供,不提供任何担保。IQOptionWiki 独立于…… IQ Option 平台运营商。本平台内容不构成投资建议或收益保证。