OPEN-SOURCE SCRIPT
TS vs Previous Candle (TSC/TSD)

This indicator detects **Turtle Soup (TS) reversal triggers** using a strict **previous-candle reference** and prints signals **only on bar close** (non-repainting intrabar).
* **TS Bull:** the current bar **sweeps below the prior low** (liquidity grab) and then **closes back above the prior low**.
* **TS Bear:** the current bar **sweeps above the prior high** and then **closes back below the prior high**.
An optional strict mode can require the close to remain **inside the previous candle’s range** for cleaner mean-reversion structure.
Each signal is further classified as:
* **TSC (Clean):** candle body aligns with the TS direction (bull body for TS Bull, bear body for TS Bear).
* **TSD (Dirty):** candle body contradicts the TS direction (or doji), highlighting weaker/less “clean” reversals.
Use it to map **liquidity sweeps + reversal closes** and to separate higher-quality TS setups (TSC) from more ambiguous ones (TSD) for further filtering (trend, levels, sessions, risk rules).
* **TS Bull:** the current bar **sweeps below the prior low** (liquidity grab) and then **closes back above the prior low**.
* **TS Bear:** the current bar **sweeps above the prior high** and then **closes back below the prior high**.
An optional strict mode can require the close to remain **inside the previous candle’s range** for cleaner mean-reversion structure.
Each signal is further classified as:
* **TSC (Clean):** candle body aligns with the TS direction (bull body for TS Bull, bear body for TS Bear).
* **TSD (Dirty):** candle body contradicts the TS direction (or doji), highlighting weaker/less “clean” reversals.
Use it to map **liquidity sweeps + reversal closes** and to separate higher-quality TS setups (TSC) from more ambiguous ones (TSD) for further filtering (trend, levels, sessions, risk rules).
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。