OPEN-SOURCE SCRIPT

LW Outside Day Flip【SpeculationLab】

158
Applicable Timeframe
⚠️ Note: This indicator is primarily designed for the Daily timeframe.
Larry Williams’ original discussion and statistics were based on daily data. While it can technically be applied to other timeframes, results may vary. It is strongly recommended to use it on daily charts.

Overview
This indicator marks a classic “Outside Day + Extreme Close” price action pattern. The idea comes from Larry Williams’ Long-Term Secrets to Short-Term Trading (2nd edition, Chapter 7).
The indicator does not execute trades or generate alerts — it simply plots visual markers on the chart when the pattern conditions are met, to assist research and review.

Logic
Outside Bar Condition
Current high > previous high
Current low < previous low
Extreme Close Filter
Long signal: Close < previous low
Short signal: Close > previous high
Confirmation
Signals are only confirmed at bar close (barstate.isconfirmed), to avoid repainting during intrabar movement.

Chart Display
When a long signal is triggered, a green downward triangle is plotted above the bar.
When a short signal is triggered, a red upward triangle is plotted below the bar.
Signals are overlaid directly on the price chart (overlay=true) and serve only as visual cues.


Usage Notes
Best used as a filter or secondary confirmation tool, not as a standalone entry trigger.
Consider combining with higher timeframe trend, key support/resistance, or volume analysis.
Entries, stop losses, and profit targets should be defined and tested independently by the trader.


Limitations and Risks
In strong trending markets, these signals may fail.
In low-liquidity or gapping conditions, accuracy may be reduced.
A single candlestick pattern cannot ensure consistent profitability.


Disclaimer
This script is for educational and research purposes only. It is not financial advice. Trading carries risk, and users are solely responsible for their own decisions and results.

===================

指标适用范围
⚠️ 特别提示:本指标主要适用于日线图(Daily Timeframe)。
Larry Williams 的原始讨论与统计均基于日线数据。虽然技术上可以在其它周期应用,但效果可能会不同,建议严格以日线作为主要参考周期。

功能概述
本指标用于在图表上标记一种经典的“外包线 + 极端收盘”的价格行为形态。思路参考 Larry Williams 在《Long-Term Secrets to Short-Term Trading》(第二版,第七章)中对日线“Outside Day”与反向收盘的讨论。指标不包含交易执行或提醒功能,仅在满足条件时绘制信号标记,用于辅助研究。

计算逻辑
外包线(Outside Bar)判定
最高价高于前一根K线的最高价;
最低价低于前一根K线的最低价。
极端收盘过滤
做多信号(Long):收盘价低于前一根K线的最低价;
做空信号(Short):收盘价高于前一根K线的最高价。
确认方式
仅在K线收盘后确认(避免盘中信号反复出现/消失)。

绘图说明
触发做多条件时,在K线 上方 绘制 绿色 向下三角形标记。
触发做空条件时,在K线 下方 绘制 红色 向上三角形标记。
信号直接叠加在价格图上(overlay=true),仅作提示。

使用建议
建议作为筛选条件或二次确认工具,不要单独作为入场依据;
可以配合趋势方向、关键支撑/阻力、成交量等其他因素一起使用;
入场、止损与止盈需由使用者自行定义和验证。

限制与风险
在强趋势行情中,信号可能失效;
在低流动性或跳空行情中,信号准确度下降;
单一形态不能保证稳定盈利。

免责声明
本指标仅用于教育与研究,不构成投资建议。实际交易风险由使用者自行承担。

คำจำกัดสิทธิ์ความรับผิดชอบ

ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมที่ ข้อกำหนดการใช้งาน