PROTECTED SOURCE SCRIPT

Strat Combo Detector (ATH)

28
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:
  • 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. 1=inside (high<=previous high and low >= previous low)
  2. 2=directional (neither inside nor outside)
  3. 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에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.