Pin Bar Inside Bar 脚本

← 全部 74 个剧本

iqow-pin-bar-inside-bar.lua 6 KB · 免费,MIT 许可证

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

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

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

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

  • 价格行动
  • 关于价格
  • 中级

根据相关文章,查找针形线和内包线组合:一根拒绝K线之后紧接着一根K线维持在其价格区间内。当价格随后收盘价突破针形线并沿影线方向移动时,标记就会出现。

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

规则

更高标记

一根看涨的针形线(下影线至少是实体的 2 倍,且占价格范围的 50%)之后紧接着一根内包线,并且在接下来的 4 根蜡烛线中,有一根蜡烛线的收盘价高于针形线的最高价。

下限标记

一根看跌的针形线(上影线至少是实体的 2 倍,且占价格区间的 50%)之后紧接着一根内包线,并且在接下来的 4 根蜡烛线中,有一根蜡烛线的收盘价低于针形线的最低价。

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

如何阅读它

小小的绿色和红色圆点分别标记了看涨针形线的最高价和看跌针形线的最低价;这些圆点代表了必须突破的价位。在内包线之后,收盘价高于或低于该价位的K线会出现一个更高的三角形或更低的三角形。

使用的指标

  • 针形蜡烛图几何形状
  • 内部柱状图

视图相同,但带有内置指示器: 没有原生指标;需要手动识别形态:一根针形柱,在其范围内的一根内包柱,然后收盘价超过针形柱。

默认设置

芯材与本体的比例2
灯芯份额范围0.5
突破窗口(K线)4

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

关键点

  1. 该组合由三部分组成:一根pin bar、一根inside bar,然后是一根突破蜡烛。
  2. 这种针形蜡烛的烛芯很长,烛身很短。烛芯指向的方向与我们想要的方向相反。
  3. 下一根K线是内包线:它的最高价和最低价都落在pin bar的范围内。
  4. 然后我们等待收盘价突破pin bar的远端,向上突破看涨pin bar,向下突破看跌pin bar。
  5. 这些点表示针形柱,因此您可以看到是哪根蜡烛开始形成这种形态的。
  6. 文章还分析了支撑位和阻力位。您可以自行绘制这些价位,并在模拟平衡表上进行测试。

局限性。 文章中为该组合添加了支撑位或阻力位,但本脚本并未绘制这些位置,因此许多标记点会位于价格区间的中间位置。针形线阈值(影线至少覆盖价格区间的一半,比针形线布林带脚本中的 60% 更为宽松)和 4 根 K 线突破窗口是本脚本根据文章的总体描述所做的精确解读,并且未涵盖内包针形线延续形态。在投入真实资金之前,请先在模拟账户中进行测试。

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

完整的源代码

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

-- SPDX-License-Identifier: MIT
-- IQOptionWiki QCS Library
-- IQOW Pin Bar Inside Bar v1.0.0
--
-- Pin bar and inside bar combo. A pin bar (long wick, small body) shows price
-- rejection. The next candle is an inside bar: its whole range sits within the
-- pin bar's range, a pause before the move. The setup completes when a candle
-- closes beyond the pin bar's far side, in the direction of the pin.
-- Pin geometry (inputs): wick at least 2x the body and at least 50% of the range.
--
-- HIGHER: bullish pin bar (long lower wick), then an inside bar, then within
--         the breakout window a candle closes above the pin bar's high.
-- LOWER:  bearish pin bar (long upper wick), then an inside bar, then within
--         the breakout window a candle closes below the pin bar's low.
--
-- 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 Pin Bar Inside Bar",
    short_name = "IQOW PIN IB",
    overlay = true
}

input_group {
    "1. Pin bar geometry",
    wick_to_body = input (2, "Wick at least X times the body", input.double, 1, 10, 0.5, false),
    wick_share = input (0.5, "Wick at least this share of the range", input.double, 0.4, 0.95, 0.05, false)
}

input_group {
    "2. Combo timing",
    breakout_window = input (4, "Breakout window after the inside bar (candles)", input.integer, 1, 6)
}

input_group {
    "Display and advice",
    pins_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",
    bullish_pin_color = input { default = "#25E154", type = input.color },
    bearish_pin_color = input { default = "#FF6C58", type = input.color },
    pin_width = input { default = 3, 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 }
}

-- Candle geometry. A pin bar has a long wick on one side and a small body.
local open_now = get_value (open, nil)
local high_now = get_value (high, nil)
local low_now = get_value (low, nil)
local close_now = get_value (close, nil)

local data_is_ready = open_now ~= nil and high_now ~= nil and low_now ~= nil and close_now ~= nil

local candle_range = 0
local body_size = 0
local lower_wick = 0
local upper_wick = 0
if data_is_ready then
    candle_range = high_now - low_now
    body_size = math.abs (close_now - open_now)
    lower_wick = math.min (open_now, close_now) - low_now
    upper_wick = high_now - math.max (open_now, close_now)
end
local has_range = candle_range > 1e-10

bullish_pin = conditional (
    data_is_ready and has_range and
    lower_wick >= wick_to_body * body_size and
    lower_wick >= wick_share * candle_range
)

bearish_pin = conditional (
    data_is_ready and has_range and
    upper_wick >= wick_to_body * body_size and
    upper_wick >= wick_share * candle_range
)

-- Look back for a pin bar followed by an inside bar. The pin bar sits "back"
-- candles ago, the inside bar right after it. No candle since the pin bar may
-- have closed beyond its far side already, so only the first breakout counts.
local bullish_combo = false
local bearish_combo = false

if data_is_ready then
    for back = 2, breakout_window + 1 do
        local pin_high = get_value (high [back], nil)
        local pin_low = get_value (low [back], nil)
        local inside_high = get_value (high [back - 1], nil)
        local inside_low = get_value (low [back - 1], nil)

        if pin_high ~= nil and pin_low ~= nil and inside_high ~= nil and inside_low ~= nil and
            inside_high <= pin_high and inside_low >= pin_low then
            local broke_up_before = false
            local broke_down_before = false
            for later = 1, back - 1 do
                local later_close = get_value (close [later], nil)
                if later_close == nil or later_close > pin_high then
                    broke_up_before = true
                end
                if later_close == nil or later_close < pin_low then
                    broke_down_before = true
                end
            end

            if get_value (bullish_pin [back], false) and not broke_up_before and close_now > pin_high then
                bullish_combo = true
            end
            if get_value (bearish_pin [back], false) and not broke_down_before and close_now < pin_low then
                bearish_combo = true
            end
        end
    end
end

higher_setup = conditional (bullish_combo)
lower_setup = conditional (bearish_combo)

-- 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)
)

-- Dots on the pin bars themselves (pin high for bullish, pin low for bearish),
-- so the chart shows which candle started the combo.
if pins_visible then
    plot (iff (bullish_pin, high, nil), "Bullish pin high", bullish_pin_color, pin_width, 0, style.points)
    plot (iff (bearish_pin, low, nil), "Bearish pin low", bearish_pin_color, pin_width, 0, style.points)
end

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

    plot_shape (
        confirmed_lower,
        "PIN IB 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 评分71排名#1326 个可直接进入的交易窗口 · 测试了 529,069 笔交易

布林格牌

这种形态的针形线,其长影线延伸至布林带外侧,而线身则回落至内侧。布林带显示价格被拉伸的位置;针形线则表明这种拉伸被拒绝。

指标: 布林带(20,2)· 针形K线几何形状

  • 价格行动
  • 关于价格
  • 中级
IQOW 评分10排名#4926 个可直接进入的交易窗口 · 测试了 1,519,205 笔交易

RSI EMA200 吞没形态

这根K线形成了一个吞没形态,其方向与200日长期EMA均线和50日RSI中线一致。EMA和RSI会过滤掉与整体趋势相反的吞没形态。

指标: EMA(200)· RSI(14,中线 50)· 吞没形态

  • 价格行动
  • 关于价格
  • 初学者
IQOW 评分12排名#4826 个可直接进入的交易窗口 · 测试了 984,691 笔交易

三根蜡烛续篇

标记显示,当价格位于 20 日均线 (EMA 20) 的对应侧时,连续三根颜色相同的饱满蜡烛收盘价稳定。该期权可以将读数反转为文章中描述的逆势交易策略。

指标: 三根完整蜡烛图 · EMA(20)

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

一般风险警告

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