OPEN-SOURCE SCRIPT

Needle Below 20, Sub-chart

112
## 指标名称

**单针下20副图(Needle Below 20, Sub-chart)**

## 一句话概述

在**中周期保持强势**的背景下,用短周期的“快速降温”来定位**强势回撤/错杀**,并额外标记**极端超卖(双线归零)**的情绪极值窗口。

---

## 指标逻辑与构成

本指标包含两条强弱线(随机指标风格的区间归一化):

* **短期线(默认 3)**
反映近短周期内价格在区间的位置,敏感度高,用于捕捉短线回撤与情绪快速降温。

* **长期线(默认 21)**
反映中周期强弱分布,用作“趋势/强势背景”的过滤。

并提供两类柱状提示(STICK):

1. **双线归零(默认:短期≤6 且 长期≤6)**
代表“情绪极端恐慌/极端超卖”的窗口,更多用于观察**反弹可能性**与“风险释放阶段”。

2. **单针下20(默认:短期≤20 且 长期≥80)**
代表“中周期强势未破 + 短线急跌/下探”的典型回撤信号,用于寻找趋势交易中的**回撤介入候选**。

图中绘制 **80/20** 参考线,帮助快速判断分位区域。

---

## 使用方法(推荐工作流)

### 1)先定“背景”:只在你认可的趋势环境使用

本指标本质是“**强势回撤定位器**”,并不负责替你判断大盘/板块/个股是否处于可交易趋势。建议搭配以下任一类过滤器:

* **趋势过滤(强烈推荐)**

* 价格位于中长期均线之上(例:MA50/MA200 上方)
* 或者你自己的趋势线/多空线系统显示多头趋势(如:快线>慢线、结构未破)

* **结构过滤(强烈推荐)**

* 回撤仍然在关键支撑之上(前高、趋势线、箱体上沿回踩等)
* 避免在明显“破位下跌”的结构中把信号当作抄底依据

### 2)信号触发后的处理:不要“看到就买”,而是“进入观察与触发”

* **单针下20(黄柱)**:
作为“候选提示”,下一步关注是否出现:

* 回踩关键位后的止跌K线(锤子线/吞没/放量止跌等)
* 次日/后续重新站回关键位或出现趋势延续确认
* 量价关系转好(缩量回撤、放量反转等)

* **双线归零(红柱)**:
更偏“情绪极值”提示,常见用途是:

* 提醒你风险已经释放到极端区域,观察是否出现反弹结构
* 不建议无过滤硬抄底;更适合与“结构止跌/大盘企稳”一起使用

---

## 风险控制与止损思路(示例,不构成建议)

以下仅提供“如何把信号落到可执行”的框架示例:

* **入场触发(示例)**

* 黄柱出现后:等待价格在关键位止跌,或出现确认K线再介入
* 分批:先小仓试错,确认后再加

* **止损锚点(示例)**

* 关键支撑位下破(趋势线/前低/箱体下沿)
* 或“信号触发后的反弹失败又破前低”

* **仓位建议(原则)**

* 把仓位大小与止损距离联动:止损距离越大,仓位越小
* 避免单次信号重仓;这类信号更适合“低风险试错 + 确认加仓”的趋势回撤逻辑

---

## 参数说明与调参建议

### 1)为什么是 3 / 21?

* **3**:强调“短期情绪/回撤”的敏感度,适合捕捉快速下探
* **21**:近似一个月交易日,刻画中周期强弱背景,适合作为“强势过滤”

如果你交易周期更短(更偏日内/隔日):

* 可考虑 **短期 2–5**、长期 **13–34** 区间做测试。
如果你交易周期更长(偏波段/中线):
* 可考虑 **短期 5–8**、长期 **34–55**。

### 2)为什么阈值是 6 / 20 / 80?

* **6**:更接近“极端”区域,用于标记情绪极值(双线归零)
* **20/80**:经典分位阈值,表示低位/高位区域,用于区分“短弱/长强”的错位状态

### 3)如何调参更贴合你的市场与标的?

建议按“信号密度—胜率—回撤”三者权衡:

* 信号太多:

* 降低“长期≥”阈值的触发频率(如 80→85)
* 或提高“短期≤”门槛的严苛度(20→15)
* 或把长期周期加长(21→34)
* 信号太少:

* 放宽阈值(长期 80→75、短期 20→25)
* 或缩短长期周期(21→13)

调参务必结合你常交易的品种波动特征,建议在同一市场同一类标的上做一致性回测/复盘。

---

## 免责声明

本脚本仅用于教育与研究目的,展示一种技术分析可视化方法,不构成任何形式的投资建议、交易建议或收益承诺。市场有风险,交易需谨慎。使用者应基于自身风险承受能力独立决策,并对交易结果自行负责。作者不对任何因使用本脚本导致的直接或间接损失承担责任。

---

## 致谢与来源

* **策略/思路来源**:B站 UP 主 **z哥** 的相关分享与讲解。
* **实现说明**:本脚本为 TradingView(Pine Script)版本的复现与可视化实现,便于在 TradingView 环境中使用与研究。
* 如原作者对公开引用有额外要求,请以原作者说明为准;若有侵权或需要修改归因方式,请联系我调整/下架相关描述。

下面给你补齐一份**英文版(可直接用于 TradingView 发布页)**,并与中文版结构对齐,符合社区常见写法(Overview / How it works / How to use / Inputs / Risk / Credits)。

---

## Title

**Needle Below 20 (Sub-chart) — TDX Style Recreation**

## Overview

This indicator is an auxiliary tool designed to spot **sharp short-term pullbacks (shakeouts) within a strong mid-term regime**, and to highlight **extreme oversold “panic” zones**. It is best used as a **candidate filter and timing aid** inside a broader trend-following framework, rather than as a standalone buy/sell signal.

## How it works

The script plots two normalized strength lines (stochastic-style normalization over a lookback window):

* **Short-term line (default: 3 bars)**
Captures fast sentiment cooling and short-term compression (high sensitivity).

* **Long-term line (default: 21 bars)**
Represents the mid-cycle regime strength, used as a context filter.

It also provides two stick/column signals:

1. **Double-Line Near-Zero (Red stick)**
Triggered when **Short-term ≤ 6 AND Long-term ≤ 6** (defaults).
This typically represents an **extreme oversold / capitulation-like** window, often used to monitor potential technical rebounds (confirmation recommended).

2. **Needle Below 20 (Yellow stick)**
Triggered when **Short-term ≤ 20 AND Long-term ≥ 80** (defaults).
This is commonly interpreted as a **strong regime intact + sudden short-term dump/pullback**, useful for spotting potential **trend pullback re-entry candidates**.

Reference levels **80/20** are drawn for quick zone reading.

### How to use (recommended workflow)

1. **Define the regime first (strongly recommended)**
This indicator does not decide whether a market is tradable. Use a trend/structure filter, for example:

* Price above a medium/long MA (e.g., MA50/MA200), or your own trend model
* Structure not broken (support holds, pullback into a valid support zone)

2. **Treat signals as “watchlist triggers,” not instant entries**

* **Yellow stick (Needle Below 20):**
After it prints, look for confirmation such as:

* A hold/reclaim of a key level (prior high, trendline, range top retest, etc.)
* A reversal candle or continuation confirmation
* Constructive volume/price behavior (e.g., pullback on lighter volume, rebound with demand)

* **Red stick (Double-Line Near-Zero):**
Best viewed as an **extreme sentiment/oversold marker**. Avoid blind bottom-fishing; combine with structure stabilization and broader market context.

## Risk management (examples, not financial advice)

* **Entry trigger (example):** scale in after confirmation rather than buying the first signal
* **Stop reference (example):** below the key support / prior swing low / structural invalidation level
* **Position sizing principle:** size positions based on stop distance; larger stop = smaller size

## Inputs / Parameters

* **Lookbacks (3 / 21):**

* 3 bars: short-term sensitivity for fast pullback detection
* 21 bars: mid-cycle regime context (roughly one trading month)

Suggested adjustments:

* Shorter-term trading: try **2–5** (short) and **13–34** (long)

* Longer swing trading: try **5–8** (short) and **34–55** (long)

* **Thresholds (6 / 20 / 80):**

* 6: “extreme” zone for near-zero panic marker
* 20/80: classic zone thresholds for low/high regime separation

If signals are too frequent:

* tighten thresholds (e.g., long ≥ 80 → 85, short ≤ 20 → 15), or lengthen long lookback (21 → 34)

If signals are too rare:

* loosen thresholds (e.g., long ≥ 80 → 75, short ≤ 20 → 25), or shorten long lookback (21 → 13)

## Disclaimer

This script is provided for **educational and research purposes only**. It does **not** constitute financial advice, investment recommendations, or any guarantee of performance. Trading involves risk. You are solely responsible for your decisions and outcomes.

## Credits / Attribution

* **Concept origin:** Inspired by the Bilibili creator **“z哥”**.
* **Implementation:** This is a TradingView (Pine Script) recreation for visualization and study.
If the original creator has specific attribution requirements, please follow the creator’s instructions. If any changes are needed, attribution text can be updated accordingly.

## Citation snippet
> Concept inspired by Bilibili creator “z哥”. Pine Script recreation for educational/research use.

Haftungsausschluss

Die Informationen und Veröffentlichungen sind nicht als Finanz-, Anlage-, Handels- oder andere Arten von Ratschlägen oder Empfehlungen gedacht, die von TradingView bereitgestellt oder gebilligt werden, und stellen diese nicht dar. Lesen Sie mehr in den Nutzungsbedingungen.