iqow-morning-evening-star-rsi.lua 6 KB · 免费,MIT 许可证
如报名参加 IQ Option 网络交易室。Quadcode 在移动设备上不会绘制“更高”和“更低”标记。
将其添加到 IQ Option 在3步骤中
- 获取文件。 点击“获取脚本”。浏览器会保存一个 .lua 文件。
- 导入 IQ Option. 在模拟账户中打开网页交易室。点击图表左下角的波浪图标,打开“脚本”选项卡,点击“导入脚本”并选择文件。
- 将其添加到图表中。 代码会在编辑器中打开。点击代码下方的加号按钮(添加到图表)。只有在编辑完代码后才需要保存。
风险。 交易可能亏损。标记是基于图表观察得出的结论,并非预测,且此脚本已在测试数据上验证,未经实盘交易验证。请先在模拟账户上进行测试。
- 翻转
- 关于价格
- 中级
当中间那根K线的RSI指标处于低位或高位时,该指标会标记出晨星和黄昏星K线形态。RSI指标有助于检查该形态是否会向相反方向发展。
规则
更高标记
一根完整的阴线,一根较小的中间线(最多为第一根阴线的 30%),以及一根阳线,收盘价高于第一根阴线的中点,且中间线的 RSI(14) 低于 40。
下限标记
一根完整的阳线,一根较小的中间线(最多为第一根阳线的 30%),以及一根阴线,收盘价低于第一根阳线的中间点,且中间线的 RSI(14) 高于 60。
下一个K线开盘后,会在完成该形态的K线上绘制一个标记。这只是一个图表观察结果,并非交易指令。
如何阅读它
图表上没有线条;请解读K线。绿色“上涨”三角形表示晨星形态的第三根K线,红色“下跌”三角形表示昏星形态的第三根K线。RSI区域是脚本内部的阈值,可以在输入参数中更改。
使用的指标
- 晨星蜡烛和昏星蜡烛
- RSI(14,40/60)
视图相同,但带有内置指示器: 将 RSI (14) 指标与 40 和 60 水平线结合,并凭肉眼观察三根蜡烛组成的星形。
默认设置
| 第一根K线的最小实体占比范围 | 0.5 |
|---|---|
| 中间蜡烛的最大实体占第一根蜡烛实体的比例 | 0.3 |
| RSI时期 | 14 |
| 晨星RSI水平 | 40 |
| 晚星RSI水平 | 60 |
每个值都是脚本设置中的一个输入项。平台提示默认关闭。
关键点
- 晨星形态由三根蜡烛组成:一根大的阴线、一根小的犹豫不决的阳线和一根阳线。
- 第三根K线的收盘价必须高于第一根K线的中点。
- 中间那根K线的RSI低于40,表明价格先是被压低了。
- 晨星是RSI高于60的镜像星。
- 标记物确认蜡烛已完成。
- 观察周围的趋势和水平,并在练习余额上进行练习。
局限性。 文章描述了一种形态,其中间的K线类似十字星,且之前存在趋势;该形态通过50%和30%的实体部分以及RSI指标来定义其几何形状。这种形态较为罕见,且在缺乏支撑位和阻力位等背景信息的情况下可能失效。在投入真实资金之前,请先在模拟账户中进行测试。
完整的源代码
下载和预览指向的是同一个已审核文件。SHA-256:07f1c732aa63ceaab1324fbe15ac62f7ce56b5abbd62c33741c8054be288dee4
-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Morning Evening Star RSI v1.0.1
--
-- Three-candle star reversal patterns, filtered by RSI so the pattern forms
-- after a push into an oversold or overbought area. The middle candle must
-- have a small body (indecision) compared with the first candle.
--
-- 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: morning star. Candle 1 is a full bearish candle, candle 2 has a
-- small body, candle 3 is bullish and closes above the midpoint of
-- candle 1's body. RSI(14) on candle 2 is below 40.
-- LOWER: evening star. Mirror image, RSI(14) on candle 2 is 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 Morning Evening Star RSI",
short_name = "IQOW STAR RSI",
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),
small_body_ratio = input (0.3, "Middle candle: maximum body share of first body", input.double, 0.05, 0.9, 0.05, false)
}
input_group {
"2. RSI",
rsi_period = input (14, "RSI period", input.integer, 2, 100),
oversold_level = input (40, "Morning star: RSI below", input.double, 5, 50, 1, false),
overbought_level = input (60, "Evening star: 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 two bars back, candle 2 one bar back, candle 3 is this bar.
local open_1 = get_value (open [2], nil)
local close_1 = get_value (close [2], nil)
local high_1 = get_value (high [2], nil)
local low_1 = get_value (low [2], nil)
local open_2 = get_value (open [1], nil)
local close_2 = get_value (close [1], nil)
local open_3 = get_value (open, nil)
local close_3 = get_value (close, nil)
local rsi_2 = get_value (rsi_value [1], 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
open_3 ~= nil and close_3 ~= nil and
rsi_2 ~= nil
-- Body sizes and the first candle's range. A zero body or range never qualifies.
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 middle_is_small = body_1 > 0 and body_2 <= small_body_ratio * body_1
-- Candle 3 must close beyond the midpoint of candle 1's body.
local midpoint_1 = data_is_ready and (open_1 + close_1) / 2 or 0
local morning_star =
data_is_ready and first_is_full and middle_is_small and
close_1 < open_1 and
close_3 > open_3 and close_3 > midpoint_1 and
rsi_2 < oversold_level
local evening_star =
data_is_ready and first_is_full and middle_is_small and
close_1 > open_1 and
close_3 < open_3 and close_3 < midpoint_1 and
rsi_2 > overbought_level
higher_setup = conditional (morning_star)
lower_setup = conditional (evening_star)
-- 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,
"Star HIGHER",
shape_style.triangleup,
shape_size.small,
higher_color,
shape_location.belowbar,
-1,
"HIGHER",
signal_text_color
)
plot_shape (
confirmed_lower,
"Star 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 法律
标记短线RSI(5)在突破极端区域后,收盘价回落至30或70线上方的K线。这是相关文章中提到的RSI法则,以已完成K线标记的形式呈现。
指标: RSI(5,30/70)
- 翻转
- 关于价格
- 初学者
STARC频段反转
表示一根阳线或阴线收盘后又回到STARC通道内,而前一根蜡烛的收盘价位于通道外。通道显示了价格在ATR指标上的拉伸程度。
指标: STARC 波段(SMA 6、ATR 15、x2)
- 翻转
- 关于价格
- 初学者
随机PSAR
随机指标%K/%D交叉点位于超卖或超买区域,同时抛物线转向指标(Parabolic SAR)点位于价格的相应一侧。随机指标指示时机,而转向指标则检查追踪止损是否与此一致。
指标: 随机(14,3,3)·抛物线SAR(0.02,0.2)
下载全部 74 个脚本,打包成一个 ZIP 文件 · 本软件采用 MIT 许可证,按“原样”提供,不提供任何担保。IQOptionWiki 独立于…… IQ Option 平台运营商。本平台内容不构成投资建议或收益保证。