Regime-Filtered Overbought/Oversold V1 (Ariston)《Regime-Filtered Overbought/Oversold V1(Ariston)》是一个overlay主图型的“状态识别”工具,用超买超卖阈值去捕捉极端动量区间,同时用Regime Filter把同样的超买/超卖拆分成“趋势延伸”与“震荡反转”两类完全不同的交易语境,并将结论直接投射到价格图上。
“Regime-Filtered Overbought/Oversold V1 (Ariston)” is an on-chart overlay state-identification tool. It uses overbought/oversold thresholds to capture extreme momentum conditions, and applies a regime filter to split the same OB/OS readings into two very different trading contexts—trend extension versus range reversal—then projects the result directly onto the price chart.
指标的第一层是 Stochastic 计算,它不是一个频繁给出提示的 oscillators,而是更偏“极端状态报警器”:当一致性进入极端区间,才进入可执行的观察窗口。
Layer one is the Stochastic calculation. It is not designed to fire frequent oscillator prompts; it functions more like an “extreme-state alarm.” Only when the signal aligns and enters an extreme zone does it open an actionable observation window.
第二层是 Regime Filter:这个过滤器的意义在于同一个“超买”在趋势中常常代表“强势延伸的顺势机会”,在震荡中更接近“均值回归的反向机会”,两者不应被同一种颜色、同一种心理预期去处理。
Layer two is the Regime Filter. Its purpose is to reframe the same “overbought” reading: in trends it often represents a continuation-friendly extension opportunity, while in ranges it is closer to a mean-reversion fade setup. These two contexts should not be handled with the same color coding or the same mental model.
你也可以关闭 useRegime,此时指标退化为“震荡风格”的展示(超买=黄,超卖=蓝),保持简单。
You can also disable useRegime, in which case the indicator falls back to a simplified range-style display (Overbought = Yellow, Oversold = Blue).
可视化层面,该指标把状态映射成四种主图背景色(可调透明度):趋势背景下的超买显示红色(Trend+OB=Red),趋势背景下的超卖显示绿色(Trend+OS=Green);震荡背景下的超买显示黄色(Range+OB=Yellow),震荡背景下的超卖显示蓝色(Range+OS=Blue)。
Visually, the indicator maps states into four on-chart background colors (with adjustable transparency): Trend+OB is Red, Trend+OS is Green; Range+OB is Yellow, Range+OS is Blue.
这四种颜色本质上是在告诉你“同样是 OB/OS,当前更像 continuation 还是 mean-reversion”,从而在交易执行上自动切换思维框架。
These four colors are effectively telling you: “For the same OB/OS reading, does the current context look more like continuation or mean reversion?”—so you can switch execution mindset accordingly.
在“趋势且极端”的红/绿场景下,指标还会额外绘制分段趋势线(Segment Trendlines),用来给出更贴近价格的动态参考。红色状态(Trend+OB)会在K线下方生成一条红色上行分段线;绿色状态(Trend+OS)会在K线上方生成一条绿色下行分段线。
In “trend and extreme” red/green scenarios, the indicator additionally draws Segment Trendlines as a closer-to-price dynamic reference. In Red state (Trend+OB), it prints a red rising segment line below candles; in Green state (Trend+OS), it prints a green falling segment line above candles.
线条只在 useRegime=true 且趋势过滤达到趋势阈值时启用,且每一段状态结束后都会保留历史,不会回收删除,方便你回看过去的极端区间是如何展开与终结的。
These lines only activate when useRegime = true and the trend filter meets its threshold, and each segment is kept historically after the state ends (no cleanup/deletion), making it easy to review how prior extreme regimes evolved and resolved.
使用上,这个指标更适合作为“仓位管理与情境提示器”而不是机械开平仓信号机。
In practice, this indicator is better used as a “position management and context prompt” rather than a mechanical entry/exit signal engine.
参数方面,你主要会动三组:Stochastic 的 kLen/dLen/阈值决定“极端”的敏感度;ADX 长度与阈值决定趋势/震荡分界;背景透明度与 ATR 偏移决定视觉与线条贴合程度。
Parameter-wise, you will mainly adjust three blocks: Stochastic kLen/dLen/thresholds define extreme sensitivity; ADX length and threshold define the trend/range boundary; background transparency and ATR offset tune visual fit and line proximity.
若你希望信号更少更“干净”,通常提高 ADX 阈值或加大 kLen 会更有效;若你希望更快捕捉极端,降低 kLen 或降低 OB/OS 阈值即可,但要接受噪声上升。Debug 选项会在红/绿状态打点,用于检验状态触发是否符合预期。
If you want fewer, cleaner signals, raising the ADX threshold or increasing kLen tends to be effective. If you want faster extreme detection, reduce kLen or relax OB/OS thresholds—at the cost of more noise. The Debug option prints markers in red/green states to validate triggers against your expectations.
免责声明:该指标输出的是“条件状态与市场语境”,不保证对未来收益率有确定性预测价值;在低流动性品种、跳空频繁品种或极端新闻驱动阶段,Stochastic 与 ADX 的解释力可能下降,建议结合你自己的风险框架与执行规则使用。
Disclaimer: this indicator outputs conditional states and market context; it does not guarantee predictive edge or deterministic future returns. In low-liquidity markets, gap-prone instruments, or extreme news-driven regimes, the explanatory power of Stochastic and ADX may degrade. Use it alongside your own risk framework and execution rules.
Pine Script® indicator






















