分形鳄鱼脚本

← 全部 74 个剧本

iqow-fractal-alligator.lua 6 KB · 免费,MIT 许可证

如报名参加 IQ Option 网络交易室。Quadcode 在移动设备上不会绘制“更高”和“更低”标记。

将其添加到 IQ Option 在3步骤中

  1. 获取文件。 点击“获取脚本”。浏览器会保存一个 .lua 文件。
  2. 导入 IQ Option. 在模拟账户中打开网页交易室。点击图表左下角的波浪图标,打开“脚本”选项卡,点击“导入脚本”并选择文件。
  3. 将其添加到图表中。 代码会在编辑器中打开。点击代码下方的加号按钮(添加到图表)。只有在编辑完代码后才需要保存。

风险。 交易可能亏损。标记是基于图表观察得出的结论,并非预测,且此脚本已在测试数据上验证,未经实盘交易验证。请先在模拟账户上进行测试。

  • 趋势
  • 关于价格
  • 先进的

当最后一个已确认的分形水平位于鳄鱼齿状线之外时,即标志着收盘价突破了该分形水平。鳄鱼齿状线提供趋势参考,分形线提供突破水平。

  • 文件 iqow-fractal-alligator.lua
  • 版本 1.0.0
  • 尺寸 164 行 · 6 KB
  • 时限 燃烧时间5分钟至15分钟的蜡烛
  • 执照 麻省理工学院简介
在合成蜡烛上绘制的分形鳄鱼
脚本的绘制方式,以测试生成的合成蜡烛图为例进行说明。这只是标记和线条的示意图,并非真实市场数据或结果。

规则

更高标记

蜡烛图收盘价高于上一个已确认的向上分形水平,而前一个收盘价位于该水平或低于该水平,并且该水平位于鳄鱼齿上方。

下限标记

蜡烛图收盘价低于上一个已确认的下降分形水平,而前一个收盘价位于该水平或高于该水平,并且该水平低于鳄鱼齿水平。

下一个K线开盘后,会在完成该形态的K线上绘制一个标记。这只是一个图表观察结果,并非交易指令。

如何阅读它

蓝线、红线和绿线分别代表鳄鱼的下颚、牙齿和嘴唇,绘制时向前偏移。白色虚线表示最后确认的上下分形。绿色“更高”三角形表示收盘价高于最后一个上分形,且该收盘价位于牙齿上方;红色“更低”三角形表示镜像情况。

使用的指标

  • 威廉姆斯分形(5)
  • 鳄鱼(13/8/5,移位 8/5/3)

视图相同,但带有内置指示器: 添加 Fractal (5) 和 Alligator (13/8/5),并注意通过牙齿线以外的分形层闭合。

默认设置

下颌期/移位13 / 8
牙齿周期/移位8 / 5
唇部周期/转变5 / 3
分形尺寸5支蜡烛

每个值都是脚本设置中的一个输入项。平台提示默认关闭。

关键点

  1. 分形是由五根K线组成,最高价或最低价位于中间。
  2. 直到两根K线之后才得到确认,因此脚本永远不会使用未来的K线。
  3. 脚本会记住最后几个上升和下降的分形层级。
  4. 鳄鱼牙齿代表趋势参考线,向前移动了五个K线。
  5. 收盘价穿过牙齿趋势侧的分形水平线时,标记为“更高”或“更低”。
  6. 在模拟账户上练习,观察横盘整理市场时会发生什么。

局限性。 分形形态只有在中间K线之后的两根K线才能被确认,因此其水平线出现存在延迟。本文单独描述了分形形态,未使用鳄鱼线规则,因此鳄鱼线过滤器是此库的附加功能;与相邻高点或低点重合的形态仍然被视为分形,就像官方分形带一样。在投入真实资金之前,请先在模拟账户中进行测试。

学习策略: 在 IQOptionWiki 上阅读完整指南 →

完整的源代码

下载的文件和预览文件指向的是同一个已审核的文件。SHA-256:e68442c95bce26c5e639bab25350fd6a468206234f05b81afc6d7182e23b2d14

-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Fractal Alligator v1.0.0
--
-- Combines Williams fractals (five candles, confirmed two candles after the
-- middle one) with the Alligator (SMMA of the median price, jaw 13 shifted
-- 8, teeth 8 shifted 5, lips 5 shifted 3). The Alligator teeth act as the
-- trend reference: a fractal level beyond the teeth means the break comes
-- from the trend side.
--
-- HIGHER: close crosses above the last up-fractal level, and that level is
--         above the Alligator teeth.
-- LOWER:  close crosses below the last down-fractal level, and that level is
--         below the Alligator teeth.
--
-- 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 Fractal Alligator",
    short_name = "IQOW FR ALLIG",
    overlay = true
}

input_group {
    "1. Alligator",
    jaw_period = input (13, "Jaw period", input.integer, 2, 100),
    jaw_shift = input (8, "Jaw shift", input.integer, 0, 30),
    teeth_period = input (8, "Teeth period", input.integer, 2, 100),
    teeth_shift = input (5, "Teeth shift", input.integer, 0, 30),
    lips_period = input (5, "Lips period", input.integer, 2, 100),
    lips_shift = input (3, "Lips shift", input.integer, 0, 30)
}

input_group {
    "Display and advice",
    alligator_visible = input { default = true, type = input.plot_visibility },
    fractals_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",
    jaw_color = input { default = "#56CEFF", type = input.color },
    teeth_color = input { default = "#FF6C58", type = input.color },
    lips_color = input { default = "#25E154", type = input.color },
    fractal_color = input { default = rgba(255, 255, 255, 0.6), 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 }
}

-- Alligator lines: SMMA (ssma) of the median price.
jaw_line = ssma (hl2, jaw_period)
teeth_line = ssma (hl2, teeth_period)
lips_line = ssma (hl2, lips_period)

-- Williams fractal: the middle candle of five has the highest high (or lowest
-- low). It is only confirmed two candles later, so the pivot is read at [2]
-- and the level is remembered until the next fractal appears. No future bars.
local pivot_high = get_value (high [2], nil)
local pivot_low = get_value (low [2], nil)

local is_up_fractal =
    pivot_high ~= nil and get_value (high [4], nil) ~= nil and
    get_value (high, 0) <= pivot_high and get_value (high [1], 0) <= pivot_high and
    get_value (high [3], 0) <= pivot_high and get_value (high [4], 0) <= pivot_high

local is_down_fractal =
    pivot_low ~= nil and get_value (low [4], nil) ~= nil and
    get_value (low, 0) >= pivot_low and get_value (low [1], 0) >= pivot_low and
    get_value (low [3], 0) >= pivot_low and get_value (low [4], 0) >= pivot_low

up_fractal_level = iff (is_up_fractal, high [2], up_fractal_level [1])
down_fractal_level = iff (is_down_fractal, low [2], down_fractal_level [1])

-- The Alligator is drawn shifted forward. The value shown under the current
-- candle is the teeth calculated teeth_shift candles ago.
local teeth_now = get_value (teeth_line [teeth_shift], nil)
local up_level = get_value (up_fractal_level, nil)
local down_level = get_value (down_fractal_level, nil)
local close_now = get_value (close, nil)
local close_previous = get_value (close [1], nil)

local data_is_ready =
    teeth_now ~= nil and up_level ~= nil and down_level ~= nil and
    close_now ~= nil and close_previous ~= nil

higher_setup = conditional (
    data_is_ready and
    up_level > teeth_now and
    close_now > up_level and close_previous <= up_level
)

lower_setup = conditional (
    data_is_ready and
    down_level < teeth_now and
    close_now < down_level and close_previous >= down_level
)

-- 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 alligator_visible then
    plot (jaw_line, "Jaw", jaw_color, line_width, jaw_shift)
    plot (teeth_line, "Teeth", teeth_color, line_width, teeth_shift)
    plot (lips_line, "Lips", lips_color, line_width, lips_shift)
end

if fractals_visible then
    plot (up_fractal_level, "Last up fractal", fractal_color, line_width, 0, style.points)
    plot (down_fractal_level, "Last down fractal", fractal_color, line_width, 0, style.points)
end

if signals_visible then
    plot_shape (
        confirmed_higher,
        "Fractal HIGHER",
        shape_style.triangleup,
        shape_size.small,
        higher_color,
        shape_location.belowbar,
        -1,
        "HIGHER",
        signal_text_color
    )

    plot_shape (
        confirmed_lower,
        "Fractal 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

更多趋势脚本

  • 趋势
  • 关于价格
  • 初学者
IQOW 评分35排名#3426 个可直接进入的交易窗口 · 测试了 2,031,679 笔交易

平金足 EMA

仅当价格收于 50 日均线 (EMA 50) 的对应侧时,才会在连续出现两根方向相反的蜡烛图后,标记出第一根看涨或看跌的 Heikin-Ashi 蜡烛图。Heikin-Ashi 是在脚本内部计算的,因此图表可以保持常规蜡烛图。

指标: Heikin-Ashi蜡烛图(计算值)· EMA(50)

  • 趋势
  • 关于价格
  • 先进的
IQOW 评分19排名#4426 个可直接进入的交易窗口 · 测试了 673,525 笔交易

一目棋纯云

当价格已经位于彩色一目均衡图云图的趋势侧时,基准线(Kijun-sen)的收盘价会再次穿过基准线。云图决定方向,基准线交叉决定时机。

指标: 一目均衡图(9, 26, 52, 位移 26)

  • 趋势
  • 关于价格
  • 中级
IQOW 评分44排名#2926 个可直接进入的交易窗口 · 测试了 5,378,870 笔交易

KAMA趋势

标记收盘价与考夫曼自适应移动平均线(KAMA)的交叉点,且交叉方向与KAMA的倾斜方向一致。斜率检查会剔除价格仅触及平坦、缓慢移动的KAMA的交叉点。

指标: 卡玛(10,2,30)

下载全部 74 个脚本,打包成一个 ZIP 文件 · 本软件采用 MIT 许可证,按“原样”提供,不提供任何担保。IQOptionWiki 独立于…… IQ Option 平台运营商。本平台内容不构成投资建议或收益保证。

一般风险警告

公司提供的金融产品具有高风险,可能导致您损失所有资金。 你永远不应该投资你不能承受损失的钱。
请注意,本文不提供任何投资建议。 所提供的有关过去事件或未来潜在发展的信息仅是一种意见,不能保证是真实的,包括所提供的示例。 我们相应地提醒读者。