OPEN-SOURCE SCRIPT
已更新

TheStrat Master

242
The Strat refers to a trading strategy that simplifies market analysis by focusing on price action and candlestick patterns. Here are some key points about The Strat:
Candlestick Patterns: The Strat categorizes price bars into Inside Bars, Directional Bars, and Outside Bars, which help traders identify potential trading opportunities.
1
Simple Rules: It emphasizes three main components: price action, direction, and time frame alignment, making it accessible for both new and experienced traders.
1
Decision-Making: The Strat provides a framework for making decisions based on price movements, reducing emotional trading and improving accuracy.
1
Educational Resources: There are various resources available, including cheat sheets and mentorship programs, to help traders learn and apply The Strat effectively.
1

For more detailed information, you can explore the resources provided in the results.
版本注释
Script Description: Strat FTFC Alerts

Strat FTFC Alerts is a price-action indicator based on Rob Smith’s TheStrat candle classification system. It detects common Strat sequences and can optionally filter them using Full Time Frame Continuity (FTFC) across multiple higher timeframes. It also supports TradingView alerts that output a CALLS vs PUTS bias plus a rule-based strike suggestion derived from the underlying price.

This script is designed for non-repainting alerts when used with “bar close only” logic.

What the script detects
Candle Types (TheStrat)

Each candle is classified based on its high and low relative to the prior candle:

1 (Inside Bar): high ≤ prior high AND low ≥ prior low

2U (Directional Up): high > prior high AND low ≥ prior low

2D (Directional Down): low < prior low AND high ≤ prior high

3 (Outside Bar): high > prior high AND low < prior low

Supported patterns

This script detects these 3-bar or 2-bar Strat sequences:

Reversal patterns

2-1-2 Bull: 2D → 1 → 2U

2-1-2 Bear: 2U → 1 → 2D

2-2 Bull Reversal: 2D → 2U

2-2 Bear Reversal: 2U → 2D

3-2-2 Bull: 3 → 2D → 2U

3-2-2 Bear: 3 → 2U → 2D

3-1-2 (Chicago) Bull: 3 → 1 → 2U

3-1-2 (Chicago) Bear: 3 → 1 → 2D

1-2-2 Bull: 1 → 2D → 2U

1-2-2 Bear: 1 → 2U → 2D

Added pattern

1-3-2 Bull: 1 → 3 → 2U

1-3-2 Bear: 1 → 3 → 2D

Confirmation rules (optional)

You can require a “takeout” on the trigger candle:

Bull signals require high > previous high

Bear signals require low < previous low

This helps avoid weak signals that do not actually break structure.

FTFC (Full Time Frame Continuity) filter

If enabled, signals only trigger when FTFC agrees on multiple timeframes.

You choose 3 timeframes (example: 15m, 60m, Daily).
The script counts alignment for each direction:

Bull FTFC alignment: timeframe candle type is 2U (optionally include 3)

Bear FTFC alignment: timeframe candle type is 2D (optionally include 3)

You can choose how strict it is:

Min aligned timeframes: 1, 2, or 3

FTFC Flip alerts

The script also detects when FTFC switches:

FTFC Flip Bullish: previous bar not bull-aligned, current bar is bull-aligned

FTFC Flip Bearish: previous bar not bear-aligned, current bar is bear-aligned

Calls/Puts bias + strike suggestion (rule-based)

When a bullish signal triggers, alerts can include:

Bias: CALLS

A suggested call strike computed from the underlying price

When a bearish signal triggers:

Bias: PUTS

A suggested put strike

Important limitation

TradingView Pine Script cannot access the real options chain (strikes, OI, expiry, delta, etc.).
So strike selection here is rule-based math only, using:

Price reference: Close / HL2 / OHLC4

Round to strike step (example: 1.00 for SPY)

Offset steps from ATM

Optional ITM preference

If your market uses unusual strike increments (0.50, 5.00, etc.), adjust the strike step accordingly.

Alerts setup (critical)
Recommended: One alert for everything (dynamic messages)

This script uses alert() for dynamic text, so to receive CALLS/PUTS + strike in the message:

Create Alert

Condition: select Strat FTFC Alerts

Choose Any alert() function call

Frequency: Once per bar close

Trigger: Every time

Optional: Separate static alerts

The script also includes alertcondition() for:

Strat Bull Signal

Strat Bear Signal

FTFC Flip Bullish

FTFC Flip Bearish

These are static text and will not include strike details like dynamic alerts.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。