iqow-tsi-signal-cross.lua 4 KB · 免费,MIT 许可证
对于价格高于约 100 的资产(例如日元货币对),此脚本的面板可能会隐藏其标记,因此也需要导入标记文件:它会在价格图表上绘制这些标记。
如报名参加 IQ Option 网络交易室。Quadcode 在移动设备上不会绘制“更高”和“更低”标记。
将其添加到 IQ Option 在3步骤中
- 获取文件。 点击“获取脚本”。浏览器会保存一个 .lua 文件。
- 导入 IQ Option. 在模拟账户中打开网页交易室。点击图表左下角的波浪图标,打开“脚本”选项卡,点击“导入脚本”并选择文件。
- 将其添加到图表中。 代码会在编辑器中打开。点击代码下方的加号按钮(添加到图表)。只有在编辑完代码后才需要保存。
风险。 交易可能亏损。标记是基于图表观察得出的结论,并非预测,且此脚本已在测试数据上验证,未经实盘交易验证。请先在模拟账户上进行测试。
- 动力泉源
- 自有面板
- 中级
标记 TSI 穿过其信号线,但仅当交叉点位于零线远端时才会触发:向上穿过零线下方,向下穿过零线上方。要求交叉点位于零线远端,可确保标记点仅适用于从拉伸读数开始的转弯。
指标面板中的标记绘制在K线价格上,因此对于价格高于100左右的资产(例如日元货币对),标记会超出面板范围。加载 tsi信号交叉标记 在价格图表上看到相同的标记。
观看:安装并跟随练习交易。
规则
更高标记
TSI(25, 13) 向上穿过其 EMA(7) 信号线,而 TSI 低于零。
下限标记
TSI(25, 13) 向下穿过其 EMA(7) 信号线,而 TSI 高于零。
下一个K线开盘后,会在完成该形态的K线上绘制一个标记。这只是一个图表观察结果,并非交易指令。
如何阅读它
蓝线是TSI曲线,红线是它的信号线,围绕着另一幅图中一条很浅的零线。面板底部出现一个绿色的“更高”三角形,表示蓝线在零线下方、红线上方的位置;面板顶部出现一个红色的“更低”三角形,表示蓝线在零线上方、红线在零线下方的位置。
使用的指标
- 真实强度指数(25,13)
- EMA信号(7)
视图相同,但带有内置指示器: 添加真实强度指标 (25, 13),信号线为 7 周期 EMA。 IQ Option 指标清单。
默认设置
| 长期 | 25 |
|---|---|
| 短期 | 13 |
| 信号EMA周期 | 7 |
每个值都是脚本设置中的一个输入项。平台提示默认关闭。
关键点
- 真实强度指数通过对价格变化进行两次平滑处理来衡量动量。
- TSI 指数的 EMA 信号线显示了动量何时发生转变。
- 我们只使用远离零点的交叉点,因此 TSI 已经向一个方向拉伸了。
- 蓝色穿过零度以下的红色上方表示较高;蓝色穿过零度以下的红色下方表示较低。
- 标记位于指标面板中,并在蜡烛图完成后进行确认。
- 在练习平衡表上尝试 7 到 13 之间的不同信号周期。
局限性。 TSI 指标经过两次平滑处理,因此会穿过滞后价格,并且可能在反转趋势开始后出现。在强劲的趋势中,TSI 指标可能在反复穿过其信号线的同时,始终保持在零轴的一侧。文章中描述的信号周期为 7 到 13 天;此脚本默认设置为 7 天。在投入真实资金之前,请先在模拟账户中进行测试。
完整的源代码
下载的文件和预览文件指向的是同一个已审核的文件。SHA-256:cbb1e3bab29b24e387f203f02b7dd9345fc58b9933da8f39637f2bd6ddc87fcb
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW TSI Signal Cross v1.0.0
--
-- 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.
-- The oscillator is drawn in its own panel under the chart.
--
-- 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",
short_name = "IQOW TSI",
overlay = false
}
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",
lines_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",
tsi_color = input { default = "#56CEFF", type = input.color },
signal_color = input { default = "#FF6C58", type = input.color },
zero_color = input { default = rgba(255, 255, 255, 0.25), 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 }
}
-- 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)
)
hline (0, "Zero", zero_color, 1)
if lines_visible then
plot (tsi_value, "TSI", tsi_color, line_width)
plot (signal_line, "TSI signal", signal_color, line_width)
end
if signals_visible then
plot_shape (
confirmed_higher,
"TSI HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.bottom,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"TSI LOWER",
shape_style.triangledown,
shape_size.small,
lower_color,
shape_location.top,
-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
更多动量脚本
- 动力泉源
- 信号引擎
- 关于价格
- 先进的
IQ_WIKI_BINARY_SIGNAL_GUN_V1.1.0
更严格的局部汇合引擎,结合加权RSI、ATR归一化MACD、布林带指标和形态族投票。可选的策略对齐方式必须与基准方向一致。
指标: 加权RSI · ATR标准化MACD · 布林带 · 模式族 · ATR风险
- 动力泉源
- 关于价格
- 初学者
超棒的振荡器 SMA
标记动量震荡指标沿100周期简单移动平均线方向穿过零轴的K线。简单移动平均线可作为震荡指标的简单趋势滤波器。
指标: 超振幅振荡器 (5, 34) · SMA (100)
- 动力泉源
- 自有面板
- 初学者
双倍动量 20 3
标记快速动量(3)线沿慢速动量(20)线方向与零轴交叉的K线。慢速线指示趋势方向,快速线指示时机。
指标: 动量(20)· 动量(3)
下载全部 74 个脚本,打包成一个 ZIP 文件 · 本软件采用 MIT 许可证,按“原样”提供,不提供任何担保。IQOptionWiki 独立于…… IQ Option 平台运营商。本平台内容不构成投资建议或收益保证。