PROTECTED SOURCE SCRIPT
Strat Combo Detector (ATH)

The Strat Combo Detector detects user-defined strat combos (inside/directional/outside bars) on a chosen higher timeframe and optionally marks examples for research.
What it does: This indicator accepts a flexible timeframe string (e.g., 12h, 1H, 3D, or minute counts like 60), parses a human-entered combo string such as 3-2-2 or 3-1, and checks whether the most-recent bars match the requested pattern.
Why it's helpful/unique:
How the bar types are defined:
Use the description above to reproduce the logic -- thresholds and ties are coded with <=/>= intentionally to include equal highs/lows.
How to use: Set Detection Timeframe, provide a combo. string like 2-3 or 3-2-2, toggle whether to include forming candles, and enable labels only if you want visible markers.
Limitations & notes: This is a detection/research helper, not an execution system. Alerts use a fixed message (Pine requires constant alert strings) -- customize alert text when creating an alert in the TradingView UI. Results depend on timeframe and symbol; verify with your own backtests.
Disclaimer: Not trading advice. Use risk management. Do your own backtesting.
What it does: This indicator accepts a flexible timeframe string (e.g., 12h, 1H, 3D, or minute counts like 60), parses a human-entered combo string such as 3-2-2 or 3-1, and checks whether the most-recent bars match the requested pattern.
Why it's helpful/unique:
- Supports flexible timeframe input (converts h suffix to minutes), making it easier to work with non-standard higher timeframe labels.
- Parses human-friendly combo strings and defends against invalid tokens.
- Offers an Include Open Bars option for users who want to detect forming candles vs only confirmed bars.
- Default publishing behavior keeps chart clean (labels off); there's an example-label mode to generate a small nuber of annotated examples for screenshots.
How the bar types are defined:
- 1=inside (high<=previous high and low >= previous low)
- 2=directional (neither inside nor outside)
- 3=outside (high > previous high and low < previous low).
Use the description above to reproduce the logic -- thresholds and ties are coded with <=/>= intentionally to include equal highs/lows.
How to use: Set Detection Timeframe, provide a combo. string like 2-3 or 3-2-2, toggle whether to include forming candles, and enable labels only if you want visible markers.
Limitations & notes: This is a detection/research helper, not an execution system. Alerts use a fixed message (Pine requires constant alert strings) -- customize alert text when creating an alert in the TradingView UI. Results depend on timeframe and symbol; verify with your own backtests.
Disclaimer: Not trading advice. Use risk management. Do your own backtesting.
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用它,没有任何限制 — 在此处了解更多信息。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
受保护脚本
此脚本以闭源形式发布。 但是,您可以自由使用它,没有任何限制 — 在此处了解更多信息。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。